Skip to content

CINFRA-2514 Removed caBundle from webhook #976

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 14 additions & 35 deletions chart/templates/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ metadata:
name: chaos-controller
webhooks:
- clientConfig:
{{- if not .Values.controller.webhook.generateCert }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this value from values.yaml if it's no longer used anywhere

caBundle: Cg==
{{- else }}
caBundle: {{ b64enc $ca.Cert }}
{{- end }}
# must NOT specify caBundle here, as of k8s 1.31:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! We can remove the caBundle entry entirely, we don't need these comments.

# Updates to CustomResourceDefinition are no longer allowed to transition a valid `caBundle` field to an invalid `caBundle` field
service:
name: chaos-controller-webhook-service
namespace: {{ .Values.chaosNamespace }}
Expand Down Expand Up @@ -54,11 +51,8 @@ metadata:
name: chaos-controller-disruptioncrons
webhooks:
- clientConfig:
{{- if not .Values.controller.webhook.generateCert }}
caBundle: Cg==
{{- else }}
caBundle: {{ b64enc $ca.Cert }}
{{- end }}
# must NOT specify caBundle here, as of k8s 1.31:
# Updates to CustomResourceDefinition are no longer allowed to transition a valid `caBundle` field to an invalid `caBundle` field
service:
name: chaos-controller-webhook-service
namespace: {{ .Values.chaosNamespace }}
Expand Down Expand Up @@ -90,11 +84,8 @@ metadata:
name: chaos-controller-disruptioncrons
webhooks:
- clientConfig:
{{- if not .Values.controller.webhook.generateCert }}
caBundle: Cg==
{{- else }}
caBundle: {{ b64enc $ca.Cert }}
{{- end }}
# must NOT specify caBundle here, as of k8s 1.31:
# Updates to CustomResourceDefinition are no longer allowed to transition a valid `caBundle` field to an invalid `caBundle` field
service:
name: chaos-controller-webhook-service
namespace: {{ .Values.chaosNamespace }}
Expand Down Expand Up @@ -123,11 +114,8 @@ metadata:
name: chaos-controller
webhooks:
- clientConfig:
{{- if not .Values.controller.webhook.generateCert }}
caBundle: Cg==
{{- else }}
caBundle: {{ b64enc $ca.Cert }}
{{- end }}
# must NOT specify caBundle here, as of k8s 1.31:
# Updates to CustomResourceDefinition are no longer allowed to transition a valid `caBundle` field to an invalid `caBundle` field
service:
name: chaos-controller-webhook-service
namespace: {{ .Values.chaosNamespace }}
Expand Down Expand Up @@ -157,11 +145,8 @@ metadata:
name: chaos-controller-pod-chaos-handler
webhooks:
- clientConfig:
{{- if not .Values.controller.webhook.generateCert }}
caBundle: Cg==
{{- else }}
caBundle: {{ b64enc $ca.Cert }}
{{- end }}
# must NOT specify caBundle here, as of k8s 1.31:
# Updates to CustomResourceDefinition are no longer allowed to transition a valid `caBundle` field to an invalid `caBundle` field
service:
name: chaos-controller-webhook-service
namespace: {{ .Values.chaosNamespace }}
Expand Down Expand Up @@ -196,11 +181,8 @@ metadata:
name: chaos-controller-user-info
webhooks:
- clientConfig:
{{- if not .Values.controller.webhook.generateCert }}
caBundle: Cg==
{{- else }}
caBundle: {{ b64enc $ca.Cert }}
{{- end }}
# must NOT specify caBundle here, as of k8s 1.31:
# Updates to CustomResourceDefinition are no longer allowed to transition a valid `caBundle` field to an invalid `caBundle` field
service:
name: chaos-controller-webhook-service
namespace: {{ .Values.chaosNamespace }}
Expand Down Expand Up @@ -237,11 +219,8 @@ metadata:
name: chaos-controller-disruption-span-context
webhooks:
- clientConfig:
{{- if not .Values.controller.webhook.generateCert }}
caBundle: Cg==
{{- else }}
caBundle: {{ b64enc $ca.Cert }}
{{- end }}
# must NOT specify caBundle here, as of k8s 1.31:
# Updates to CustomResourceDefinition are no longer allowed to transition a valid `caBundle` field to an invalid `caBundle` field
service:
name: chaos-controller-webhook-service
namespace: {{ .Values.chaosNamespace }}
Expand Down