This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move webhookconfig to separate files
Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
- Loading branch information
Showing
6 changed files
with
88 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
assets/components/linkerd2/templates/proxy-injector-webhookconfig.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: linkerd-proxy-injector-webhook-config | ||
labels: | ||
{{.Values.global.controllerComponentLabel}}: proxy-injector | ||
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}} | ||
webhooks: | ||
- name: linkerd-proxy-injector.linkerd.io | ||
namespaceSelector: | ||
matchExpressions: | ||
- key: config.linkerd.io/admission-webhooks | ||
operator: NotIn | ||
values: | ||
- disabled | ||
clientConfig: | ||
service: | ||
name: linkerd-proxy-injector | ||
namespace: {{ .Values.global.namespace }} | ||
path: "/" | ||
{{- if and (.Values.proxyInjector.externalSecret) (empty .Values.proxyInjector.caBundle) }} | ||
{{- fail "If proxyInjector.externalSecret is true then you need to provide proxyInjector.caBundle" }} | ||
{{- end }} | ||
caBundle: {{ ternary (b64enc $ca.Cert) (b64enc (trim .Values.proxyInjector.caBundle)) (empty .Values.proxyInjector.caBundle) }} | ||
failurePolicy: {{.Values.webhookFailurePolicy}} | ||
rules: | ||
- operations: [ "CREATE" ] | ||
apiGroups: [""] | ||
apiVersions: ["v1"] | ||
resources: ["pods"] | ||
{{- if not .Values.omitWebhookSideEffects }} | ||
sideEffects: None | ||
{{- end }} |
22 changes: 22 additions & 0 deletions
22
assets/components/linkerd2/templates/smi-metrics-apiservice.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{- if .Values.smiMetrics.enabled }} | ||
apiVersion: apiregistration.k8s.io/v1 | ||
kind: APIService | ||
metadata: | ||
name: v1alpha1.metrics.smi-spec.io | ||
labels: | ||
{{.Values.global.controllerComponentLabel}}: smi-metrics | ||
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}} | ||
spec: | ||
group: metrics.smi-spec.io | ||
version: v1alpha1 | ||
insecureSkipTLSVerify: false | ||
groupPriorityMinimum: 100 | ||
versionPriority: 100 | ||
service: | ||
name: linkerd-smi-metrics | ||
namespace: {{.Values.global.namespace}} | ||
{{- if and (.Values.smiMetrics.externalSecret) (empty .Values.smiMetrics.caBundle) }} | ||
{{- fail "If smiMetrics.externalSecret is true then you need to provide smiMetrics.caBundle" }} | ||
{{- end }} | ||
caBundle: {{ ternary (b64enc $cert.Cert) (b64enc (trim .Values.smiMetrics.caBundle)) (empty .Values.smiMetrics.caBundle) }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
assets/components/linkerd2/templates/sp-validator-webhookconfig.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
kind: ValidatingWebhookConfiguration | ||
metadata: | ||
name: linkerd-sp-validator-webhook-config | ||
labels: | ||
{{.Values.global.controllerComponentLabel}}: sp-validator | ||
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}} | ||
webhooks: | ||
- name: linkerd-sp-validator.linkerd.io | ||
namespaceSelector: | ||
matchExpressions: | ||
- key: config.linkerd.io/admission-webhooks | ||
operator: NotIn | ||
values: | ||
- disabled | ||
clientConfig: | ||
service: | ||
name: linkerd-sp-validator | ||
namespace: {{ .Values.global.namespace }} | ||
path: "/" | ||
{{- if and (.Values.profileValidator.externalSecret) (empty .Values.profileValidator.caBundle) }} | ||
{{- fail "If profileValidator.externalSecret is true then you need to provide profileValidator.caBundle" }} | ||
{{- end }} | ||
caBundle: {{ ternary (b64enc $ca.Cert) (b64enc (trim .Values.profileValidator.caBundle)) (empty .Values.profileValidator.caBundle) }} | ||
failurePolicy: {{.Values.webhookFailurePolicy}} | ||
rules: | ||
- operations: [ "CREATE" , "UPDATE" ] | ||
apiGroups: ["linkerd.io"] | ||
apiVersions: ["v1alpha1", "v1alpha2"] | ||
resources: ["serviceprofiles"] | ||
{{- if not .Values.omitWebhookSideEffects }} | ||
sideEffects: None | ||
{{- end }} |