Skip to content

Commit

Permalink
Merge pull request #43 from finleap-connect/fix/webhook-config-v1
Browse files Browse the repository at this point in the history
Fix webhook config for crd
  • Loading branch information
jastBytes authored Jun 22, 2022
2 parents 0b9e0cc + 0a621b8 commit fda1979
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
13 changes: 7 additions & 6 deletions charts/vault-operator/templates/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ metadata:
spec:
conversion:
strategy: Webhook
webhookClientConfig:
caBundle: Cg==
service:
name: '{{ include "vault-operator.fullname" . }}-webhook'
namespace: '{{ .Release.Namespace }}'
path: /convert
webhook:
clientConfig:
caBundle: Cg==
service:
name: '{{ include "vault-operator.fullname" . }}-webhook'
namespace: '{{ .Release.Namespace }}'
path: /convert
group: vault.finleap.cloud
names:
kind: VaultSecret
Expand Down
7 changes: 4 additions & 3 deletions config/crd-templates/patches/crd_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ metadata:
cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/vault-operator-cert'
spec:
conversion:
webhookClientConfig:
service:
name: '{{ include "vault-operator.fullname" . }}-webhook'
webhook:
clientConfig:
service:
name: '{{ include "vault-operator.fullname" . }}-webhook'
preserveUnknownFields: false

4 changes: 2 additions & 2 deletions config/crd/kustomizeconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ nameReference:
fieldSpecs:
- kind: CustomResourceDefinition
group: apiextensions.k8s.io
path: spec/conversion/webhookClientConfig/service/name
path: spec/conversion/webhook/clientConfig/service/name

namespace:
- kind: CustomResourceDefinition
group: apiextensions.k8s.io
path: spec/conversion/webhookClientConfig/service/namespace
path: spec/conversion/webhook/clientConfig/service/namespace
create: false

varReference:
Expand Down
17 changes: 9 additions & 8 deletions config/crd/patches/webhook_in_vaultsecrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ metadata:
spec:
conversion:
strategy: Webhook
webhookClientConfig:
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
caBundle: Cg==
service:
namespace: system
name: '{{ include "vault-operator.fullname" . }}-webhook'
path: /convert
webhook:
clientConfig:
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
caBundle: Cg==
service:
namespace: system
name: '{{ include "vault-operator.fullname" . }}-webhook'
path: /convert

0 comments on commit fda1979

Please sign in to comment.