forked from kubeflow/manifests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
existing_arrikto: add cert-manager (kubeflow#549)
* kfdef: existing_arrikto: add cert-manager Signed-off-by: Yannis Zarkadas <[email protected]> * admission-webhook: support cert-manager certificate Signed-off-by: Yannis Zarkadas <[email protected]> * kfctl: existing_arrikto: use cert-manager for admission-webhook certificate Signed-off-by: Yannis Zarkadas <[email protected]> * regenerate tests Signed-off-by: Yannis Zarkadas <[email protected]>
- Loading branch information
1 parent
e580d56
commit 5582927
Showing
8 changed files
with
470 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
admission-webhook/webhook/overlays/cert-manager/certificate.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,14 @@ | ||
apiVersion: cert-manager.io/v1alpha2 | ||
kind: Certificate | ||
metadata: | ||
name: admission-webhook-cert | ||
spec: | ||
isCA: true | ||
commonName: $(serviceName).$(namespace).svc | ||
dnsNames: | ||
- $(serviceName).$(namespace).svc | ||
- $(serviceName).$(namespace).svc.cluster.local | ||
issuerRef: | ||
kind: ClusterIssuer | ||
name: $(issuer) | ||
secretName: webhook-certs |
12 changes: 12 additions & 0 deletions
12
admission-webhook/webhook/overlays/cert-manager/deployment.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,12 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: deployment | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: admission-webhook | ||
args: | ||
- --tlsCertFile=/etc/webhook/certs/tls.crt | ||
- --tlsKeyFile=/etc/webhook/certs/tls.key |
36 changes: 36 additions & 0 deletions
36
admission-webhook/webhook/overlays/cert-manager/kustomization.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,36 @@ | ||
bases: | ||
- ../../base | ||
|
||
resources: | ||
- certificate.yaml | ||
|
||
patchesStrategicMerge: | ||
- mutating-webhook-configuration.yaml | ||
- deployment.yaml | ||
|
||
configMapGenerator: | ||
- name: admission-webhook-parameters | ||
behavior: merge | ||
env: params.env | ||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
vars: | ||
- name: issuer | ||
objref: | ||
kind: ConfigMap | ||
name: admission-webhook-parameters | ||
apiVersion: v1 | ||
fieldref: | ||
fieldpath: data.issuer | ||
- name: cert_name | ||
objref: | ||
kind: Certificate | ||
group: cert-manager.io | ||
version: v1alpha2 | ||
name: admission-webhook-cert | ||
fieldref: | ||
fieldpath: metadata.name | ||
|
||
configurations: | ||
- params.yaml |
7 changes: 7 additions & 0 deletions
7
admission-webhook/webhook/overlays/cert-manager/mutating-webhook-configuration.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,7 @@ | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: mutating-webhook-configuration | ||
annotations: | ||
cert-manager.io/inject-ca-from: $(namespace)/$(cert_name) | ||
|
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 @@ | ||
issuer=kubeflow-self-signing-issuer |
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,9 @@ | ||
varReference: | ||
- path: spec/commonName | ||
kind: Certificate | ||
- path: spec/dnsNames | ||
kind: Certificate | ||
- path: spec/issuerRef/name | ||
kind: Certificate | ||
- path: metadata/annotations | ||
kind: MutatingWebhookConfiguration |
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
Oops, something went wrong.