-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* support other certificates * support other certificates * support other certificates * support other certificates * support other certificates
- Loading branch information
1 parent
fbd32ce
commit 2ae30bf
Showing
16 changed files
with
227 additions
and
137 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
16 changes: 16 additions & 0 deletions
16
sapbtp-operator-charts/templates/cert-manager-certificate.yml
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,16 @@ | ||
{{- if .Values.manager.certificates.certManager }} | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: sap-btp-operator-serving-cert | ||
namespace: {{.Release.Namespace}} | ||
spec: | ||
dnsNames: | ||
- sap-btp-operator-webhook-service.{{.Release.Namespace}}.svc | ||
- sap-btp-operator-webhook-service.{{.Release.Namespace}}.svc.cluster.local | ||
issuerRef: | ||
kind: Issuer | ||
name: sap-btp-operator-selfsigned-issuer | ||
secretName: webhook-server-cert | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.manager.certificates.certManager }} | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: sap-btp-operator-selfsigned-issuer | ||
namespace: {{.Release.Namespace}} | ||
spec: | ||
selfSigned: {} | ||
{{- end}} |
23 changes: 23 additions & 0 deletions
23
sapbtp-operator-charts/templates/gardener-cert-manager-certificate.yml
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,23 @@ | ||
{{- if .Values.manager.certificates.gardenerCertManager }} | ||
--- | ||
apiVersion: cert.gardener.cloud/v1alpha1 | ||
kind: Certificate | ||
metadata: | ||
name: sap-btp-operator-serving-cert | ||
namespace: {{.Release.Namespace}} | ||
spec: | ||
commonName: Kubernetes | ||
dnsNames: | ||
- sap-btp-operator-webhook-service.{{.Release.Namespace}}.svc | ||
- sap-btp-operator-webhook-service.{{.Release.Namespace}}.svc.cluster.local | ||
# if issuer is not specified, the default issuer is used | ||
issuerRef: | ||
{{- if .Values.manager.certificates.gardenerCertManager.issuer }} | ||
name: {{ .Values.manager.certificates.gardenerCertManager.issuer }} | ||
{{- else }} | ||
name: issuer-ca | ||
{{- end}} | ||
secretRef: | ||
name: webhook-server-cert | ||
namespace: {{.Release.Namespace}} | ||
{{- end}} |
14 changes: 14 additions & 0 deletions
14
sapbtp-operator-charts/templates/gardener-cert-manager-issuer-secret.yml
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,14 @@ | ||
{{- if .Values.manager.certificates.gardenerCertManager }} | ||
{{- if not .Values.manager.certificates.gardenerCertManager.issuer }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: issuer-ca-secret | ||
namespace: {{.Release.Namespace}} | ||
type: kubernetes.io/tls | ||
data: | ||
tls.crt: {{ .Values.manager.certificates.gardenerCertManager.crt }} | ||
tls.key: {{ .Values.manager.certificates.gardenerCertManager.key }} | ||
{{- end}} | ||
{{- end}} |
15 changes: 15 additions & 0 deletions
15
sapbtp-operator-charts/templates/gardener-cert-manager-issuer.yml
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,15 @@ | ||
{{- if .Values.manager.certificates.gardenerCertManager }} | ||
{{- if not .Values.manager.certificates.gardenerCertManager.issuer }} | ||
--- | ||
apiVersion: cert.gardener.cloud/v1alpha1 | ||
kind: Issuer | ||
metadata: | ||
name: issuer-ca | ||
namespace: {{.Release.Namespace}} | ||
spec: | ||
ca: | ||
privateKeySecretRef: | ||
name: issuer-ca-secret | ||
namespace: default | ||
{{- end}} | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: sap-btp-operator-webhook-service | ||
namespace: {{.Release.Namespace}} | ||
spec: | ||
ports: | ||
- port: 443 | ||
targetPort: 9443 | ||
selector: | ||
control-plane: controller-manager | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
control-plane: controller-manager | ||
name: sap-btp-operator-controller-manager-metrics-service | ||
namespace: {{.Release.Namespace}} | ||
spec: | ||
ports: | ||
- name: https | ||
port: 8443 | ||
targetPort: https | ||
selector: | ||
control-plane: controller-manager |
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,94 @@ | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
{{- if .Values.manager.certificates.certManager }} | ||
annotations: | ||
cert-manager.io/inject-ca-from: {{.Release.Namespace}}/sap-btp-operator-serving-cert | ||
{{- end}} | ||
name: sap-btp-operator-mutating-webhook-configuration | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1beta1 | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: sap-btp-operator-webhook-service | ||
namespace: {{.Release.Namespace}} | ||
path: /mutate-services-cloud-sap-com-v1alpha1-servicebinding | ||
{{- if .Values.manager.certificates.selfSigned }} | ||
caBundle: {{.Values.manager.certificates.selfSigned.caBundle }} | ||
{{- end }} | ||
{{- if .Values.manager.certificates.gardenerCertManager }} | ||
caBundle: {{.Values.manager.certificates.gardenerCertManager.caBundle }} | ||
{{- end }} | ||
failurePolicy: Fail | ||
name: mservicebinding.kb.io | ||
rules: | ||
- apiGroups: | ||
- services.cloud.sap.com | ||
apiVersions: | ||
- v1alpha1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- servicebindings | ||
sideEffects: None | ||
- admissionReviewVersions: | ||
- v1beta1 | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: sap-btp-operator-webhook-service | ||
namespace: {{.Release.Namespace}} | ||
path: /mutate-services-cloud-sap-com-v1alpha1-serviceinstance | ||
failurePolicy: Fail | ||
name: mserviceinstance.kb.io | ||
rules: | ||
- apiGroups: | ||
- services.cloud.sap.com | ||
apiVersions: | ||
- v1alpha1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- serviceinstances | ||
sideEffects: None | ||
--- | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: ValidatingWebhookConfiguration | ||
metadata: | ||
{{- if .Values.manager.certificates.certManager }} | ||
annotations: | ||
cert-manager.io/inject-ca-from: {{.Release.Namespace}}/sap-btp-operator-serving-cert | ||
{{- end}} | ||
name: sap-btp-operator-validating-webhook-configuration | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1beta1 | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: sap-btp-operator-webhook-service | ||
namespace: {{.Release.Namespace}} | ||
path: /validate-services-cloud-sap-com-v1alpha1-servicebinding | ||
{{- if .Values.manager.certificates.selfSigned }} | ||
caBundle: {{.Values.manager.certificates.selfSigned.caBundle }} | ||
{{- end }} | ||
{{- if .Values.manager.certificates.gardenerCertManager }} | ||
caBundle: {{.Values.manager.certificates.gardenerCertManager.caBundle }} | ||
{{- end }} | ||
failurePolicy: Fail | ||
name: vservicebinding.kb.io | ||
rules: | ||
- apiGroups: | ||
- services.cloud.sap.com | ||
apiVersions: | ||
- v1alpha1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- servicebindings | ||
sideEffects: None |
Oops, something went wrong.