-
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.
- Loading branch information
1 parent
7e37968
commit 079655e
Showing
25 changed files
with
516 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ ignore: | | |
manifests/ | ||
vendor/ | ||
compiled/ | ||
tests/golden/ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
// main template for cm-hetznercloud | ||
local com = import 'lib/commodore.libjsonnet'; | ||
local kap = import 'lib/kapitan.libjsonnet'; | ||
local kube = import 'lib/kube.libjsonnet'; | ||
local inv = kap.inventory(); | ||
|
||
// The hiera parameters for the component | ||
local params = inv.parameters.cert_exoscale; | ||
local paramsCertManager = inv.parameters.cert_manager; | ||
|
||
|
||
local certExoscale = com.Kustomization( | ||
'https://github.com/exoscale/cert-manager-webhook-exoscale//deploy/exoscale-webhook-kustomize', | ||
params.manifestVersion, | ||
{ | ||
'exoscale/cert-manager-webhook-exoscale': { | ||
newTag: params.images.webhook.tag, | ||
newName: '%(registry)s/%(repository)s' % params.images.webhook, | ||
}, | ||
}, | ||
{ | ||
patches: [ | ||
{ | ||
target: { | ||
kind: 'Deployment', | ||
name: 'cert-manager-webhook-exoscale', | ||
namespace: 'cert-manager', | ||
}, | ||
patch: ||| | ||
- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
value: --secure-port=8443 | ||
- op: replace | ||
path: /spec/template/spec/containers/0/ports/0/containerPort | ||
value: 8443 | ||
- op: replace | ||
path: /spec/replicas | ||
value: 1 | ||
|||, | ||
}, | ||
{ | ||
target: { | ||
kind: 'ClusterRoleBinding', | ||
name: 'cert-manager-webhook-exoscale:domain-solver', | ||
}, | ||
patch: ||| | ||
- op: replace | ||
path: /subjects/0/namespace | ||
value: %(namespace)s | ||
||| % { namespace: paramsCertManager.namespace }, | ||
}, | ||
{ | ||
target: { | ||
kind: 'APIService', | ||
name: 'v1alpha1.acme.exoscale.com', | ||
}, | ||
patch: ||| | ||
- op: replace | ||
path: /metadata/annotations | ||
value: | ||
cert-manager.io/inject-ca-from: %(namespace)s/cert-manager-webhook-exoscale-webhook-tls | ||
||| % { namespace: params.namespace }, | ||
}, | ||
{ | ||
target: { | ||
kind: 'Certificate', | ||
name: 'cert-manager-webhook-exoscale-ca', | ||
namespace: 'cert-manager', | ||
}, | ||
patch: ||| | ||
- op: replace | ||
path: /spec/commonName | ||
value: ca.exoscale-webhook.%(namespace)s | ||
- op: replace | ||
path: /spec/duration | ||
value: 43800h0m0s | ||
||| % { namespace: params.namespace }, | ||
}, | ||
{ | ||
target: { | ||
kind: 'Certificate', | ||
name: 'cert-manager-webhook-exoscale-webhook-tls', | ||
namespace: 'cert-manager', | ||
}, | ||
patch: ||| | ||
- op: replace | ||
path: /spec/dnsNames | ||
value: | ||
- cert-manager-webhook-exoscale | ||
- cert-manager-webhook-exoscale.%(namespace)s | ||
- cert-manager-webhook-exoscale.%(namespace)s.svc | ||
- op: replace | ||
path: /spec/duration | ||
value: 8760h0m0s | ||
||| % { namespace: params.namespace }, | ||
}, | ||
], | ||
} + com.makeMergeable(params.kustomizeInput), | ||
) {}; | ||
|
||
certExoscale |
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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Overwrite parameters here | ||
|
||
# parameters: {...} | ||
parameters: | ||
cert_manager: | ||
namespace: syn-cert-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,4 @@ | ||
spec: | ||
syncPolicy: | ||
syncOptions: | ||
- ServerSideApply=true |
8 changes: 8 additions & 0 deletions
8
tests/golden/defaults/cert-exoscale/cert-exoscale/00_namespace.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,8 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
annotations: {} | ||
labels: | ||
app.kubernetes.io/name: syn-cert-exoscale | ||
name: syn-cert-exoscale | ||
name: syn-cert-exoscale |
19 changes: 19 additions & 0 deletions
19
...tomize/cert-exoscale/apiregistration.k8s.io_v1_apiservice_v1alpha1.acme.exoscale.com.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,19 @@ | ||
apiVersion: apiregistration.k8s.io/v1 | ||
kind: APIService | ||
metadata: | ||
annotations: | ||
cert-manager.io/inject-ca-from: syn-cert-exoscale/cert-manager-webhook-exoscale-webhook-tls | ||
labels: | ||
app: exoscale-webhook | ||
chart: exoscale-webhook-0.3.0 | ||
heritage: Helm | ||
release: exoscale-webhook | ||
name: v1alpha1.acme.exoscale.com | ||
spec: | ||
group: acme.exoscale.com | ||
groupPriorityMinimum: 1000 | ||
service: | ||
name: cert-manager-webhook-exoscale | ||
namespace: syn-cert-exoscale | ||
version: v1alpha1 | ||
versionPriority: 15 |
61 changes: 61 additions & 0 deletions
61
...exoscale/10_kustomize/cert-exoscale/apps_v1_deployment_cert-manager-webhook-exoscale.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,61 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: exoscale-webhook | ||
chart: exoscale-webhook-0.3.0 | ||
heritage: Helm | ||
release: exoscale-webhook | ||
name: cert-manager-webhook-exoscale | ||
namespace: syn-cert-exoscale | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: exoscale-webhook | ||
release: exoscale-webhook | ||
template: | ||
metadata: | ||
labels: | ||
app: exoscale-webhook | ||
release: exoscale-webhook | ||
spec: | ||
containers: | ||
- args: | ||
- --tls-cert-file=/tls/tls.crt | ||
- --tls-private-key-file=/tls/tls.key | ||
- --secure-port=8443 | ||
env: | ||
- name: GROUP_NAME | ||
value: acme.exoscale.com | ||
- name: EXOSCALE_DEBUG | ||
value: "" | ||
- name: EXOSCALE_API_TRACE | ||
value: "" | ||
image: docker.io/exoscale/cert-manager-webhook-exoscale:0.3.0 | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: https | ||
scheme: HTTPS | ||
name: exoscale-webhook | ||
ports: | ||
- containerPort: 8443 | ||
name: https | ||
protocol: TCP | ||
readinessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: https | ||
scheme: HTTPS | ||
resources: {} | ||
volumeMounts: | ||
- mountPath: /tls | ||
name: certs | ||
readOnly: true | ||
serviceAccountName: cert-manager-webhook-exoscale | ||
volumes: | ||
- name: certs | ||
secret: | ||
secretName: cert-manager-webhook-exoscale-webhook-tls |
17 changes: 17 additions & 0 deletions
17
...tomize/cert-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-ca.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,17 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
labels: | ||
app: exoscale-webhook | ||
chart: exoscale-webhook-0.3.0 | ||
heritage: Helm | ||
release: exoscale-webhook | ||
name: cert-manager-webhook-exoscale-ca | ||
namespace: syn-cert-exoscale | ||
spec: | ||
commonName: ca.exoscale-webhook.syn-cert-exoscale | ||
duration: 43800h0m0s | ||
isCA: true | ||
issuerRef: | ||
name: cert-manager-webhook-exoscale-selfsign | ||
secretName: cert-manager-webhook-exoscale-ca |
19 changes: 19 additions & 0 deletions
19
...rt-exoscale/cert-manager.io_v1_certificate_cert-manager-webhook-exoscale-webhook-tls.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,19 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
labels: | ||
app: exoscale-webhook | ||
chart: exoscale-webhook-0.3.0 | ||
heritage: Helm | ||
release: exoscale-webhook | ||
name: cert-manager-webhook-exoscale-webhook-tls | ||
namespace: syn-cert-exoscale | ||
spec: | ||
dnsNames: | ||
- cert-manager-webhook-exoscale | ||
- cert-manager-webhook-exoscale.syn-cert-exoscale | ||
- cert-manager-webhook-exoscale.syn-cert-exoscale.svc | ||
duration: 8760h0m0s | ||
issuerRef: | ||
name: cert-manager-webhook-exoscale-ca | ||
secretName: cert-manager-webhook-exoscale-webhook-tls |
Oops, something went wrong.