Skip to content

Commit

Permalink
Merge pull request #16 from Seraphin-/master
Browse files Browse the repository at this point in the history
Update traefik namespace for compatibility with v3
  • Loading branch information
DarinMao authored Dec 26, 2024
2 parents c1c0d7f + 01877d9 commit 9a370d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifests/klodd-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rules:
- apiGroups: [networking.k8s.io]
resources: [networkpolicies]
verbs: [create, delete]
- apiGroups: [traefik.containo.us]
- apiGroups: [traefik.io]
resources: [ingressroutes, ingressroutetcps, middlewares, middlewaretcps]
verbs: [create, delete]
- apiGroups: [klodd.tjcsec.club]
Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/k8s/instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export const createInstance = async (challengeId, teamId, log) => {
challengeConfig.middlewares.map(makeMiddleware).map((middleware) =>
customApi
.createNamespacedCustomObject(
'traefik.containo.us',
'traefik.io',
'v1alpha1',
namespace,
middlewarePlural,
Expand Down Expand Up @@ -194,7 +194,7 @@ export const createInstance = async (challengeId, teamId, log) => {
})
await customApi
.createNamespacedCustomObject(
'traefik.containo.us',
'traefik.io',
'v1alpha1',
namespace,
ingressPlural,
Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/k8s/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const makeServiceFactory =
export const makeIngressRouteFactory =
(kind) =>
({ host, serviceName, servicePort, numMiddlewares }) => ({
apiVersion: 'traefik.containo.us/v1alpha1',
apiVersion: 'traefik.io/v1alpha1',
kind: kind === 'http' ? 'IngressRoute' : 'IngressRouteTCP',
metadata: { name: 'ingress' },
spec: {
Expand Down Expand Up @@ -190,7 +190,7 @@ export const makeIngressRouteFactory =
})

export const makeMiddlewareFactory = (kind) => (middleware, idx) => ({
apiVersion: 'traefik.containo.us/v1alpha1',
apiVersion: 'traefik.io/v1alpha1',
kind: kind === 'http' ? 'Middleware' : 'MiddlewareTCP',
metadata: { name: `middleware-${idx}` },
spec: middleware,
Expand Down

0 comments on commit 9a370d1

Please sign in to comment.