Skip to content

Commit

Permalink
fix(charts): bump account-operator version to 0.6.1 and add webhook r…
Browse files Browse the repository at this point in the history
…egistration flag
  • Loading branch information
nexus49 committed Feb 17, 2025
1 parent 7731be6 commit f5e72f0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 88 deletions.
1 change: 1 addition & 0 deletions charts/account-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ A Helm chart to deploy OpenMFP Account-Operator
| subroutines.namespace.enabled | bool | `true` | Enable namespace subroutines |
| webhooks.certDir | string | `"/certs"` | The directory for webhook certificates |
| webhooks.enabled | bool | `true` | Enable webhooks |
| webhooks.register | bool | `false` | Register webhooks, flag to toggle if webhooks should be enabled on the runtime cluster |

## Overriding Values

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.webhooks.enabled -}}
{{- if and .Values.webhooks.enabled .Values.webhooks.register -}}
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,40 +398,13 @@ operator match the snapshot:
metadata:
name: account-operator
6: |
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: NAMESPACE/account-operator-serving-cert
name: account-operator-mutating-webhook-configuration
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
service:
name: account-operator-webhook
namespace: NAMESPACE
path: /mutate-core-openmfp-io-v1alpha1-account
failurePolicy: Fail
name: maccount.kb.io
rules:
- apiGroups:
- core.openmfp.io
apiVersions:
- v1alpha1
operations:
- CREATE
resources:
- accounts
sideEffects: None
7: |
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: account-operator-selfsigned-issuer
spec:
selfSigned: {}
8: |
7: |
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand All @@ -444,7 +417,7 @@ operator match the snapshot:
kind: Issuer
name: account-operator-selfsigned-issuer
secretName: account-operator-webhook-server-cert
9: |
8: |
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -860,40 +833,13 @@ operator match the snapshot (with kubeconfigSecret):
metadata:
name: account-operator
6: |
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: NAMESPACE/account-operator-serving-cert
name: account-operator-mutating-webhook-configuration
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
service:
name: account-operator-webhook
namespace: NAMESPACE
path: /mutate-core-openmfp-io-v1alpha1-account
failurePolicy: Fail
name: maccount.kb.io
rules:
- apiGroups:
- core.openmfp.io
apiVersions:
- v1alpha1
operations:
- CREATE
resources:
- accounts
sideEffects: None
7: |
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: account-operator-selfsigned-issuer
spec:
selfSigned: {}
8: |
7: |
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand All @@ -906,7 +852,7 @@ operator match the snapshot (with kubeconfigSecret):
kind: Issuer
name: account-operator-selfsigned-issuer
secretName: account-operator-webhook-server-cert
9: |
8: |
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -1315,40 +1261,13 @@ operator match the snapshot with webhook enabled:
metadata:
name: account-operator
6: |
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: NAMESPACE/account-operator-serving-cert
name: account-operator-mutating-webhook-configuration
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
service:
name: account-operator-webhook
namespace: NAMESPACE
path: /mutate-core-openmfp-io-v1alpha1-account
failurePolicy: Fail
name: maccount.kb.io
rules:
- apiGroups:
- core.openmfp.io
apiVersions:
- v1alpha1
operations:
- CREATE
resources:
- accounts
sideEffects: None
7: |
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: account-operator-selfsigned-issuer
spec:
selfSigned: {}
8: |
7: |
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand All @@ -1361,7 +1280,7 @@ operator match the snapshot with webhook enabled:
kind: Issuer
name: account-operator-selfsigned-issuer
secretName: account-operator-webhook-server-cert
9: |
8: |
apiVersion: v1
kind: Service
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/account-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ crds:
webhooks:
# -- Enable webhooks
enabled: true

# -- Register webhooks, flag to toggle if webhooks should be registered on the runtime cluster
register: false
# -- The directory for webhook certificates
certDir: /certs

Expand Down

0 comments on commit f5e72f0

Please sign in to comment.