feature(extra_manifests): initial work

fix(chart): lint

fix(chart): typo

fix(chart): typo

fix(chart): template rendering

fix(chart): template rendering

fix(chart): helm chart test

fix(chart): helm chart test

fix(chart): helm chart test name
This commit is contained in:
Matheus Fidelis 2024-05-17 07:38:19 -03:00
parent 20d9a609b5
commit 57fd73ecad
4 changed files with 66 additions and 0 deletions

View file

@ -538,6 +538,7 @@ As of version `1.26.0` of this chart, by simply not providing any clusterIP valu
| defaultBackend.topologySpreadConstraints | list | `[]` | Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in. Ref.: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ |
| defaultBackend.updateStrategy | object | `{}` | The update strategy to apply to the Deployment or DaemonSet # |
| dhParam | string | `""` | A base64-encoded Diffie-Hellman parameter. This can be generated with: `openssl dhparam 4096 2> /dev/null | base64` # Ref: https://github.com/kubernetes/ingress-nginx/tree/main/docs/examples/customization/ssl-dh-param |
| extraManifests | list | `[]` | |
| imagePullSecrets | list | `[]` | Optional array of imagePullSecrets containing private registry credentials # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
| namespaceOverride | string | `""` | Override the deployment namespace; defaults to .Release.Namespace |
| podSecurityPolicy.enabled | bool | `false` | |

View file

@ -0,0 +1,5 @@
{{- range .Values.extraManifests }}
{{- $manifest := tpl . $ }}
{{ $manifest | nindent 0 }}
---
{{- end }}

View file

@ -0,0 +1,28 @@
suite: extraManifests
templates:
- extra-manifests.yaml
tests:
- it: should create a TargetGroupBinding if `extraManifests` contains TargetGroupBinding configuration
set:
extraManifests:
- |
apiVersion: elbv2.k8s.aws/v1beta1
kind: TargetGroupBinding
metadata:
name: nginx-tgb
spec:
serviceRef:
name: ingress-nginx-controller
targetGroupARN: arn:aws:elasticloadbalancing:region:123123123:targetgroup/foo
asserts:
- hasDocuments:
count: 1
- isKind:
of: TargetGroupBinding
- equal:
path: metadata.name
value: nginx-tgb
- equal:
path: spec.serviceRef.name
value: ingress-nginx-controller

View file

@ -1134,3 +1134,35 @@ portNamePrefix: ""
# This can be generated with: `openssl dhparam 4096 2> /dev/null | base64`
## Ref: https://github.com/kubernetes/ingress-nginx/tree/main/docs/examples/customization/ssl-dh-param
dhParam: ""
# Optional array to generate extra manifests.
extraManifests: []
# - |
# apiVersion: cert-manager.io/v1
# kind: ClusterIssuer
# metadata:
# name: letsencrypt-example
# spec:
# acme:
# server: https://acme-v02.api.letsencrypt.org/directory
# email: your-email@example.com
# privateKeySecretRef:
# name: letsencrypt-prod
# solvers:
# - http01:
# ingress:
# class: nginx
# - |
# apiVersion: cert-manager.io/v1
# kind: Certificate
# metadata:
# name: foo-cert
# namespace: default
# spec:
# secretName: foo-tls-secret
# issuerRef:
# name: letsencrypt-example
# kind: ClusterIssuer
# commonName: foo.bar.com
# dnsNames:
# - foo.bar.com