-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Migrate away from deprecated kustomize features #3091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5c39ccf
daf9742
08e7f57
6436d73
df9bb50
161762c
ad1dea1
00a83c6
e5b7b41
5d9f82e
b7b9c73
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,5 +4,6 @@ apiVersion: apiextensions.k8s.io/v1 | |
| kind: CustomResourceDefinition | ||
| metadata: | ||
| annotations: | ||
| cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) | ||
| # `default` and `serving-cert` may be substituted by kustomize | ||
| cert-manager.io/inject-ca-from: default/serving-cert | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, behavior change.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| name: targetgroupbindings.elbv2.k8s.aws | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,10 +14,10 @@ kind: Certificate | |
| metadata: | ||
| name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml | ||
| spec: | ||
| # $(SERVICE_NAME) and $(SERVICE_NAMESPACE) will be substituted by kustomize | ||
| # `webhook-service` and `default` may be substituted by kustomize | ||
| dnsNames: | ||
| - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc | ||
| - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local | ||
| - webhook-service.default.svc | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behavior change, normally this webhook isn't in the default namespace
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| - webhook-service.default.svc.cluster.local | ||
| issuerRef: | ||
| kind: Issuer | ||
| name: selfsigned-issuer | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,21 @@ | ||
| resources: | ||
| - certificate.yaml | ||
|
|
||
| apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
| kind: Component | ||
| configurations: | ||
| - kustomizeconfig.yaml | ||
| resources: | ||
| - certificate.yaml | ||
| patches: | ||
| # patches here are for enabling the CA injection for each CRD | ||
| - path: cainjection_in_targetgroupbindings_patch.yaml | ||
| - path: cainjection_in_ingressclassparams_patch.yaml | ||
| # This patch add annotation to admission webhook config, `default` and | ||
| # `serving-cert` may be substituted by kustomize | ||
| - target: | ||
| kind: (MutatingWebhookConfiguration|ValidatingWebhookConfiguration) | ||
| patch: |- | ||
| apiVersion: admissionregistration.k8s.io/v1 | ||
| kind: dummy | ||
| metadata: | ||
| name: webhook | ||
| annotations: | ||
| cert-manager.io/inject-ca-from: default/serving-cert |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,8 @@ | ||
| # This configuration is for teaching kustomize how to update name ref and var substitution | ||
| # This configuration is for teaching kustomize how to update name ref | ||
| nameReference: | ||
| - kind: Issuer | ||
| group: cert-manager.io | ||
| fieldSpecs: | ||
| - kind: Certificate | ||
| group: cert-manager.io | ||
| path: spec/issuerRef/name | ||
|
|
||
| varReference: | ||
| - kind: Certificate | ||
| group: cert-manager.io | ||
| path: spec/commonName | ||
| - kind: Certificate | ||
| group: cert-manager.io | ||
| path: spec/dnsNames |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,24 +2,14 @@ apiVersion: v1 | |
| kind: ServiceAccount | ||
| metadata: | ||
| name: controller | ||
| labels: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this removed?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's added via |
||
| app.kubernetes.io/component: controller | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: controller | ||
| labels: | ||
| app.kubernetes.io/component: controller | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/component: controller | ||
| replicas: 1 | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: controller | ||
| spec: | ||
| containers: | ||
| - name: controller | ||
|
|
@@ -34,6 +24,16 @@ spec: | |
| requests: | ||
| cpu: 100m | ||
| memory: 200Mi | ||
| ports: | ||
| - containerPort: 9443 | ||
| name: webhook | ||
| protocol: TCP | ||
| - containerPort: 8080 | ||
| name: metrics | ||
| protocol: TCP | ||
| - containerPort: 61779 | ||
| name: healthprobe | ||
| protocol: TCP | ||
| livenessProbe: | ||
| failureThreshold: 2 | ||
| httpGet: | ||
|
|
@@ -44,4 +44,4 @@ spec: | |
| timeoutSeconds: 10 | ||
| terminationGracePeriodSeconds: 10 | ||
| priorityClassName: system-cluster-critical | ||
| serviceAccountName: controller | ||
| serviceAccountName: controller | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a behavior change