controllers(cert-manager): install cert-manager 1.21.3 (prerequisite for the CNPG-I Barman Cloud plugin) #20
5 changed files with 101 additions and 0 deletions
controllers(cert-manager): install cert-manager 1.21.3 for the CNPG-I barman plugin
The Barman Cloud plugin release manifest ships an Issuer plus two Certificate objects (operator->plugin mTLS) and assumes cert-manager is present. Installing it as a HelmRelease off charts.jetstack.io with crds.enabled=true, in its own Flux Kustomization so the databases Kustomization can wait on it. No new cert is issued by this commit; the plugin (next change) is the only consumer.
commit
f3a8233e37
18
clusters/homek8s/cert-manager.yaml
Normal file
18
clusters/homek8s/cert-manager.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: cert-manager
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
interval: 10m0s
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: flux-system
|
||||||
|
path: ./infrastructure/controllers/cert-manager
|
||||||
|
# The HelmRelease owns the chart; pruning the Kustomization deletes the
|
||||||
|
# release object, and the chart's CRDs carry `helm.sh/resource-policy: keep`
|
||||||
|
# so they survive. Nothing here is a bare CRD in git, hence prune: true.
|
||||||
|
prune: true
|
||||||
|
wait: true
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: cert-manager
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- repository.yaml
|
||||||
|
- release.yaml
|
||||||
4
infrastructure/controllers/cert-manager/namespace.yaml
Normal file
4
infrastructure/controllers/cert-manager/namespace.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: cert-manager
|
||||||
64
infrastructure/controllers/cert-manager/release.yaml
Normal file
64
infrastructure/controllers/cert-manager/release.yaml
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
# cert-manager — installed for one reason: the Barman Cloud CNPG-I plugin
|
||||||
|
# expects its operator/plugin mTLS pair as cert-manager `Certificate` objects
|
||||||
|
# (the upstream v0.16.0 manifest ships an Issuer + two Certificates and assumes
|
||||||
|
# cert-manager is present). CNPG-I *can* run on hand-made cert bundles, but that
|
||||||
|
# would put a CA private key in a hand-maintained Secret with no renewal; the
|
||||||
|
# chart is the supported path and is ~3 small pods.
|
||||||
|
#
|
||||||
|
# CRDs: `crds.enabled: true` is required — `Certificate`/`Issuer` do not exist
|
||||||
|
# otherwise. The chart annotates its CRDs with `helm.sh/resource-policy: keep`,
|
||||||
|
# so uninstalling the release does not delete issued certs' CRDs out from under
|
||||||
|
# the running plugin. Do not add `crds.keep: false`.
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: cert-manager
|
||||||
|
namespace: cert-manager
|
||||||
|
spec:
|
||||||
|
releaseName: cert-manager
|
||||||
|
interval: 15m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: cert-manager
|
||||||
|
version: "v1.21.3"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: jetstack
|
||||||
|
namespace: cert-manager
|
||||||
|
install:
|
||||||
|
crds: CreateReplace
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
crds: CreateReplace
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
crds:
|
||||||
|
enabled: true
|
||||||
|
# Homelab sizing: upstream requests are already small, but the webhook and
|
||||||
|
# cainjector each get a memory ceiling so a runaway cannot evict the CNPG
|
||||||
|
# primary that shares this node.
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
memory: 192Mi
|
||||||
|
webhook:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 32Mi
|
||||||
|
limits:
|
||||||
|
memory: 128Mi
|
||||||
|
cainjector:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
memory: 192Mi
|
||||||
|
# No Prometheus Operator CRs here (ServiceMonitor is not installed).
|
||||||
|
prometheus:
|
||||||
|
enabled: false
|
||||||
8
infrastructure/controllers/cert-manager/repository.yaml
Normal file
8
infrastructure/controllers/cert-manager/repository.yaml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
|
kind: HelmRepository
|
||||||
|
metadata:
|
||||||
|
name: jetstack
|
||||||
|
namespace: cert-manager
|
||||||
|
spec:
|
||||||
|
interval: 24h
|
||||||
|
url: https://charts.jetstack.io/
|
||||||
Loading…
Reference in a new issue