1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 17:56:26 +00:00

Fix indentation + values.yaml (#234)

This commit is contained in:
Benjamin Durham
2022-09-10 00:40:52 +12:00
committed by GitHub
parent e3a39f6ad8
commit 3b3122aa2c
3 changed files with 42 additions and 41 deletions

View File

@@ -75,7 +75,7 @@ spec:
### ConfigMap ### ConfigMap
Now we're into the cert-manager-specific YAMLs. First, we create a ConfigMap, containing the entire contents of the helm chart's [values.yaml](https://github.com/bitnami-labs/cert-manager/blob/main/helm/cert-manager/values.yaml). Paste the values into a `values.yaml` key as illustrated below, indented 4 spaces (*since they're "encapsulated" within the ConfigMap YAML*). I create this example yaml in my flux repo: Now we're into the cert-manager-specific YAMLs. First, we create a ConfigMap, containing the entire contents of the helm chart's [values.yaml](https://github.com/bitnami/charts/blob/master/bitnami/cert-manager/values.yaml). Paste the values into a `values.yaml` key as illustrated below, indented 4 tabs (*since they're "encapsulated" within the ConfigMap YAML*). I create this example yaml in my flux repo at `cert-manager/configmap-cert-manager-helm-chart-value-overrides.yaml`:
```yaml title="/cert-manager/configmap-cert-manager-helm-chart-value-overrides.yaml" ```yaml title="/cert-manager/configmap-cert-manager-helm-chart-value-overrides.yaml"
apiVersion: v1 apiVersion: v1
@@ -96,26 +96,26 @@ Then work your way through the values you pasted, and change any which are speci
Lastly, having set the scene above, we define the HelmRelease which will actually deploy the cert-manager controller into the cluster, with the config we defined above. I save this in my flux repo: Lastly, having set the scene above, we define the HelmRelease which will actually deploy the cert-manager controller into the cluster, with the config we defined above. I save this in my flux repo:
```yaml title="/cert-manager/helmrelease-cert-manager.yaml" ```yaml title="/cert-manager/helmrelease-cert-manager.yaml'
apiVersion: helm.toolkit.fluxcd.io/v2beta1 apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease kind: HelmRelease
metadata: metadata:
name: cert-manager name: cert-manager
namespace: cert-manager namespace: cert-manager
spec: spec:
chart: chart:
spec: spec:
chart: cert-manager chart: cert-manager
version: 1.6.x version: v1.6.x
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
name: jetstack name: jetstack
namespace: flux-system namespace: flux-system
interval: 15m interval: 15m
timeout: 5m timeout: 5m
releaseName: cert-manager releaseName: cert-manager
valuesFrom: valuesFrom:
- kind: ConfigMap - kind: ConfigMap
name: cert-manager-helm-chart-value-overrides name: cert-manager-helm-chart-value-overrides
valuesKey: values.yaml # This is the default, but best to be explicit for clarity valuesKey: values.yaml # This is the default, but best to be explicit for clarity
``` ```

View File

@@ -127,29 +127,29 @@ Note that the following values changed from default, above:
Lastly, having set the scene above, we define the HelmRelease which will actually deploy the secret-replicator controller into the cluster, with the config we defined above. I save this in my flux repo: Lastly, having set the scene above, we define the HelmRelease which will actually deploy the secret-replicator controller into the cluster, with the config we defined above. I save this in my flux repo:
```yaml title="/secret-replicator/helmrelease-secret-replicator.yaml" ```yaml title="/secret-replicator/helmrelease-secret-replicator.yaml"
apiVersion: helm.toolkit.fluxcd.io/v2beta1 apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease kind: HelmRelease
metadata: metadata:
name: secret-replicator name: secret-replicator
namespace: secret-replicator namespace: secret-replicator
spec: spec:
chart: chart:
spec: spec:
chart: secret-replicator chart: secret-replicator
version: 0.6.x version: 0.6.x
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
name: kiwigrid name: kiwigrid
namespace: flux-system namespace: flux-system
interval: 15m interval: 15m
timeout: 5m timeout: 5m
releaseName: secret-replicator releaseName: secret-replicator
valuesFrom: valuesFrom:
- kind: ConfigMap - kind: ConfigMap
name: secret-replicator-helm-chart-value-overrides name: secret-replicator-helm-chart-value-overrides
valuesKey: values.yaml # This is the default, but best to be explicit for clarity valuesKey: values.yaml # This is the default, but best to be explicit for clarity
``` ```
--8<-- "kubernetes-why-not-config-in-helmrelease.md" --8<-- "kubernetes-why-not-config-in-helmrelease.md"

View File

@@ -42,7 +42,8 @@ Thanks to [Sealed Secrets](/kubernetes/sealed-secrets/), we have a safe way of c
### Staging Certificate ### Staging Certificate
Finally, we create our certificates! Here's an example certificate resource which uses the letsencrypt-staging issuer (*to avoid being rate-limited while learning!*). I save this in my flux repo: Finally, we create our certificates! Here's an example certificate resource which uses the letsencrypt-staging issuer (*to avoid being rate-limited while learning!*). I save this in my flux repo as `/letsencrypt-wildcard-cert/certificate-wildcard-cert-letsencrypt-staging.yaml`
```yaml title="/letsencrypt-wildcard-cert/certificate-wildcard-cert-letsencrypt-staging.yaml" ```yaml title="/letsencrypt-wildcard-cert/certificate-wildcard-cert-letsencrypt-staging.yaml"
apiVersion: cert-manager.io/v1 apiVersion: cert-manager.io/v1
@@ -51,14 +52,14 @@ metadata:
name: letsencrypt-wildcard-cert-example.com-staging name: letsencrypt-wildcard-cert-example.com-staging
namespace: letsencrypt-wildcard-cert namespace: letsencrypt-wildcard-cert
spec: spec:
# secretName doesn't have to match the certificate name, but it may as well, for simplicity! # secretName doesn't have to match the certificate name, but it may as well, for simplicity!
secretName: letsencrypt-wildcard-cert-example.com-staging secretName: letsencrypt-wildcard-cert-example.com-staging
issuerRef: issuerRef:
name: letsencrypt-staging name: letsencrypt-staging
kind: ClusterIssuer kind: ClusterIssuer
dnsNames: dnsNames:
- "example.com" - "example.com"
- "*.example.com" - "*.example.com"
``` ```
## Serving ## Serving
@@ -88,7 +89,7 @@ If your certificate does not become `Ready` within a few minutes [^1], try watch
### Production Certificate ### Production Certificate
Once you know you can happily deploy a staging certificate, it's safe enough to attempt your "prod" certificate. I save this in my flux repo: Once you know you can happily deploy a staging certificate, it's safe enough to attempt your "prod" certificate. I save this in my flux repo as `/letsencrypt-wildcard-cert/certificate-wildcard-cert-letsencrypt-prod.yaml`
```yaml title="/letsencrypt-wildcard-cert/certificate-wildcard-cert-letsencrypt-prod.yaml" ```yaml title="/letsencrypt-wildcard-cert/certificate-wildcard-cert-letsencrypt-prod.yaml"
apiVersion: cert-manager.io/v1 apiVersion: cert-manager.io/v1
@@ -98,11 +99,11 @@ metadata:
namespace: letsencrypt-wildcard-cert namespace: letsencrypt-wildcard-cert
spec: spec:
# secretName doesn't have to match the certificate name, but it may as well, for simplicity! # secretName doesn't have to match the certificate name, but it may as well, for simplicity!
secretName: letsencrypt-wildcard-cert-example.com secretName: letsencrypt-wildcard-cert-example.com
issuerRef: issuerRef:
name: letsencrypt-prod name: letsencrypt-prod
kind: ClusterIssuer kind: ClusterIssuer
dnsNames: dnsNames:
- "example.com" - "example.com"
- "*.example.com" - "*.example.com"
``` ```