diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index b13ed9683..d1497c05a 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -3,8 +3,8 @@ name: Traefik Mesh Pipeline agent: machine: - type: e1-standard-4 - os_image: ubuntu1804 + type: e2-standard-4 + os_image: ubuntu2204 auto_cancel: running: @@ -40,9 +40,9 @@ blocks: - name: Build and check commands: - make check build - - cache store traefik-mesh-dist-$SEMAPHORE_GIT_BRANCH-$SEMAPHORE_WORKFLOW_ID dist + - artifact push workflow dist -d traefik-mesh-dist - docker save traefik/mesh:latest > traefik-mesh-img.tar - - cache store traefik-mesh-img-$SEMAPHORE_GIT_BRANCH-$SEMAPHORE_WORKFLOW_ID traefik-mesh-img.tar + - artifact push workflow traefik-mesh-img.tar - name: Unit Tests run: @@ -62,9 +62,9 @@ blocks: task: prologue: commands: - - cache restore - - cache restore traefik-mesh-dist-$SEMAPHORE_GIT_BRANCH-$SEMAPHORE_WORKFLOW_ID - - cache restore traefik-mesh-img-$SEMAPHORE_GIT_BRANCH-$SEMAPHORE_WORKFLOW_ID + - artifact pull workflow traefik-mesh-dist -d dist + - chmod +x dist/traefik-mesh + - artifact pull workflow traefik-mesh-img.tar - docker load < traefik-mesh-img.tar jobs: - name: ACL Enabled Suite diff --git a/Makefile b/Makefile index a4a5e71d1..f887dc260 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ tidy: go mod tidy k3d: - @command -v k3d >/dev/null 2>&1 || curl -s https://raw.githubusercontent.com/rancher/k3d/v3.4.0/install.sh | TAG=v3.4.0 bash + @command -v k3d >/dev/null 2>&1 || curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v5.8.3 bash docs-package: mkdir -p $(CURDIR)/pages diff --git a/docs/content/contributing/maintainers.md b/docs/content/contributing/maintainers.md index a3937d8e7..f14f66594 100644 --- a/docs/content/contributing/maintainers.md +++ b/docs/content/contributing/maintainers.md @@ -8,7 +8,7 @@ description: "In this article, you can find the list of Traefik Mesh maintainers - Daniel Tomcej [@dtomcej](https://github.com/dtomcej) - Manuel Zapf [@SantoDE](https://github.com/SantoDE) - Michaƫl Matur [@mmatur](https://github.com/mmatur) -- Landry Benguigui [@LandryBe](https://github.com/LandryBe) +- Landry Benguigui [@lbenguigui](https://github.com/lbenguigui) - Harold Ozouf [@jspdown](https://github.com/jspdown) - Julien Levesy [@jlevesy](https://github.com/jlevesy) - Brendan Le Glaunec [@Ullaakut](https://github.com/Ullaakut) diff --git a/docs/requirements.txt b/docs/requirements.txt index b585c24ba..9fb112238 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -30,7 +30,7 @@ Pygments==2.11.2 pymdown-extensions==7.0 pyparsing==2.4.7 python-dateutil==2.8.2 -PyYAML==6.0 +PyYAML==6.0.1 pyyaml-env-tag==0.1 requests==2.26.0 retrying==1.3.3 diff --git a/integration/k3d/k3d.go b/integration/k3d/k3d.go index 09f2601c3..07db07506 100644 --- a/integration/k3d/k3d.go +++ b/integration/k3d/k3d.go @@ -20,7 +20,7 @@ import ( var ( k3sImage = "rancher/k3s" - k3sVersion = "v1.18.20-k3s1" + k3sVersion = "v1.32.13-k3s1" ) // DockerImage holds the configuration of a Docker image. @@ -41,14 +41,14 @@ type ClusterOptionFunc func(opts *ClusterOptions) // WithoutTraefik tells k3d to not start a k3s cluster with Traefik already installed in. func WithoutTraefik() func(opts *ClusterOptions) { return func(opts *ClusterOptions) { - opts.Cmd = append(opts.Cmd, "--k3s-server-arg", "--no-deploy=traefik") + opts.Cmd = append(opts.Cmd, "--k3s-arg", "--disable=traefik@server:*") } } // WithoutCoreDNS tells k3d to not start a k3s cluster with CoreDNS already installed in. func WithoutCoreDNS() func(opts *ClusterOptions) { return func(opts *ClusterOptions) { - opts.Cmd = append(opts.Cmd, "--k3s-server-arg", "--no-deploy=coredns") + opts.Cmd = append(opts.Cmd, "--k3s-arg", "--disable=coredns@server:*") } } diff --git a/integration/testdata/crds/smi-access.yaml b/integration/testdata/crds/smi-access.yaml index 298ac0f63..35bed648a 100644 --- a/integration/testdata/crds/smi-access.yaml +++ b/integration/testdata/crds/smi-access.yaml @@ -1,5 +1,5 @@ --- -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: traffictargets.access.smi-spec.io @@ -12,78 +12,83 @@ spec: - tt plural: traffictargets singular: traffictarget - version: v1alpha2 versions: - name: v1alpha2 served: true storage: true - - name: v1alpha1 - served: false - storage: false - validation: - openAPIV3Schema: - properties: - spec: - required: - - destination + schema: + openAPIV3Schema: + type: object properties: - destination: - description: The destination of this traffic target. + spec: type: object required: - - name - - kind + - destination properties: - kind: - description: Kind of the destination. - type: string - name: - description: Name of the destination. - type: string - namespace: - description: Namespace of the destination. - type: string - port: - description: Port number of the destination. - type: number - rules: - description: Specifications of this traffic target. - type: array - items: - type: object - required: - - name - - kind - properties: - kind: - description: Kind of this spec. - type: string - enum: - - HTTPRouteGroup - - TCPRoute - name: - description: Name of this spec. - type: string - matches: - description: Match conditions of this spec. - type: array - items: + destination: + description: The destination of this traffic target. + type: object + required: + - name + - kind + properties: + kind: + description: Kind of the destination. + type: string + name: + description: Name of the destination. type: string - sources: - description: Sources of this traffic target. - type: array - items: - type: object - required: - - name - - kind - properties: - kind: - description: Kind of this source. - type: string - name: - description: Name of this source. - type: string - namespace: - description: Namespace of this source. - type: string + namespace: + description: Namespace of the destination. + type: string + port: + description: Port number of the destination. + type: number + rules: + description: Specifications of this traffic target. + type: array + items: + type: object + required: + - name + - kind + properties: + kind: + description: Kind of this spec. + type: string + enum: + - HTTPRouteGroup + - TCPRoute + name: + description: Name of this spec. + type: string + matches: + description: Match conditions of this spec. + type: array + items: + type: string + sources: + description: Sources of this traffic target. + type: array + items: + type: object + required: + - name + - kind + properties: + kind: + description: Kind of this source. + type: string + name: + description: Name of this source. + type: string + namespace: + description: Namespace of this source. + type: string + - name: v1alpha1 + served: false + storage: false + schema: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true diff --git a/integration/testdata/crds/smi-specs.yaml b/integration/testdata/crds/smi-specs.yaml index 7f6bdc052..c8ea44e67 100644 --- a/integration/testdata/crds/smi-specs.yaml +++ b/integration/testdata/crds/smi-specs.yaml @@ -1,5 +1,5 @@ --- -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: httproutegroups.specs.smi-spec.io @@ -12,65 +12,74 @@ spec: - htr plural: httproutegroups singular: httproutegroup - version: v1alpha3 versions: - name: v1alpha3 served: true storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + required: + - matches + properties: + matches: + description: Match conditions of this route group. + type: array + items: + type: object + required: + - name + properties: + name: + description: Name of the HTTP route. + type: string + pathRegex: + description: URI path regex of the HTTP route. + type: string + methods: + description: The HTTP methods of this HTTP route. + type: array + items: + type: string + description: The HTTP method of this HTTP route. + enum: + - '*' + - GET + - HEAD + - PUT + - POST + - DELETE + - CONNECT + - OPTIONS + - TRACE + - PATCH + headers: + description: Header match conditions of this route. + type: array + items: + description: Header match condition of this route. + type: object + additionalProperties: + type: string - name: v1alpha2 served: false storage: false + schema: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true - name: v1alpha1 served: false storage: false - validation: - openAPIV3Schema: - properties: - spec: - required: - - matches - properties: - matches: - description: Match conditions of this route group. - type: array - items: - type: object - required: - - name - properties: - name: - description: Name of the HTTP route. - type: string - pathRegex: - description: URI path regex of the HTTP route. - type: string - methods: - description: The HTTP methods of this HTTP route. - type: array - items: - type: string - description: The HTTP method of this HTTP route. - enum: - - '*' - - GET - - HEAD - - PUT - - POST - - DELETE - - CONNECT - - OPTIONS - - TRACE - - PATCH - headers: - description: Header match conditions of this route. - type: array - items: - description: Header match condition of this route. - type: object - additionalProperties: - type: string + schema: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true --- -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: tcproutes.specs.smi-spec.io @@ -83,14 +92,25 @@ spec: - tr plural: tcproutes singular: tcproute - version: v1alpha3 versions: - name: v1alpha3 served: true storage: true + schema: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true - name: v1alpha2 served: false storage: false + schema: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true - name: v1alpha1 served: false storage: false + schema: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true diff --git a/integration/testdata/crds/smi-split.yaml b/integration/testdata/crds/smi-split.yaml index b953d1998..b46f5a802 100644 --- a/integration/testdata/crds/smi-split.yaml +++ b/integration/testdata/crds/smi-split.yaml @@ -1,5 +1,5 @@ --- -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: trafficsplits.split.smi-spec.io @@ -13,59 +13,67 @@ spec: - ts plural: trafficsplits singular: trafficsplit - version: v1alpha3 versions: - name: v1alpha3 served: true storage: true + additionalPrinterColumns: + - name: Service + type: string + description: The apex service of this split. + jsonPath: .spec.service + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + required: + - service + - backends + properties: + service: + description: The apex service of this split. + type: string + matches: + description: The HTTP route groups that this traffic split should match. + type: array + items: + type: object + required: ['kind', 'name'] + properties: + kind: + description: Kind of the matching group. + type: string + enum: + - HTTPRouteGroup + name: + description: Name of the matching group. + type: string + backends: + description: The backend services of this split. + type: array + items: + type: object + required: ['service', 'weight'] + properties: + service: + description: Name of the Kubernetes service. + type: string + weight: + description: Traffic weight value of this backend. + type: number - name: v1alpha2 served: false storage: false + schema: + openAPIV3Schema: + type: object + x-kubernetes-preserve-unknown-fields: true - name: v1alpha1 served: false storage: false - additionalPrinterColumns: - - name: Service - type: string - description: The apex service of this split. - JSONPath: .spec.service - validation: - openAPIV3Schema: - properties: - spec: + schema: + openAPIV3Schema: type: object - required: - - service - - backends - properties: - service: - description: The apex service of this split. - type: string - matches: - description: The HTTP route groups that this traffic split should match. - type: array - items: - type: object - required: ['kind', 'name'] - properties: - kind: - description: Kind of the matching group. - type: string - enum: - - HTTPRouteGroup - name: - description: Name of the matching group. - type: string - backends: - description: The backend services of this split. - type: array - items: - type: object - required: ['service', 'weight'] - properties: - service: - description: Name of the Kubernetes service. - type: string - weight: - description: Traffic weight value of this backend. - type: number + x-kubernetes-preserve-unknown-fields: true diff --git a/integration/testdata/kubedns/coredns.yaml b/integration/testdata/kubedns/coredns.yaml index d54b15cc7..17cdde8b0 100644 --- a/integration/testdata/kubedns/coredns.yaml +++ b/integration/testdata/kubedns/coredns.yaml @@ -6,7 +6,7 @@ metadata: namespace: traefik-mesh --- -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: @@ -31,7 +31,7 @@ rules: - get --- -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: annotations: diff --git a/integration/testdata/traefik-mesh/controller-acl-disabled.yaml b/integration/testdata/traefik-mesh/controller-acl-disabled.yaml index 8288cafa4..a697427f8 100644 --- a/integration/testdata/traefik-mesh/controller-acl-disabled.yaml +++ b/integration/testdata/traefik-mesh/controller-acl-disabled.yaml @@ -10,7 +10,7 @@ metadata: --- kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: traefik-mesh-controller-role namespace: traefik-mesh @@ -69,7 +69,7 @@ rules: - watch --- kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: traefik-mesh-controller namespace: traefik-mesh diff --git a/integration/testdata/traefik-mesh/controller-acl-enabled.yaml b/integration/testdata/traefik-mesh/controller-acl-enabled.yaml index f876bc692..9bbf9f198 100644 --- a/integration/testdata/traefik-mesh/controller-acl-enabled.yaml +++ b/integration/testdata/traefik-mesh/controller-acl-enabled.yaml @@ -10,7 +10,7 @@ metadata: --- kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: traefik-mesh-controller-role namespace: traefik-mesh @@ -69,7 +69,7 @@ rules: - watch --- kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: traefik-mesh-controller namespace: traefik-mesh diff --git a/integration/testdata/traefik-mesh/proxy.yaml b/integration/testdata/traefik-mesh/proxy.yaml index 7c45fdf65..5b6927d28 100644 --- a/integration/testdata/traefik-mesh/proxy.yaml +++ b/integration/testdata/traefik-mesh/proxy.yaml @@ -11,7 +11,7 @@ automountServiceAccountToken: false --- kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: traefik-mesh-proxy-role namespace: traefik-mesh @@ -28,7 +28,7 @@ rules: - list --- kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: traefik-mesh-proxy namespace: traefik-mesh