suite: test controller deployment templates: - deployment.yaml tests: - it: should match snapshot of default values asserts: - matchSnapshot: {} - it: should set imagePullPolicy to Always set: image.pullPolicy: Always asserts: - equal: path: spec.template.spec.containers[0].imagePullPolicy value: Always - it: should imagePullPolicy to be default value IfNotPresent asserts: - equal: path: spec.template.spec.containers[0].imagePullPolicy value: IfNotPresent - it: should override securityContext set: podSecurityContext: runAsUser: 2000 securityContext: runAsUser: 3000 asserts: - equal: path: spec.template.spec.securityContext value: runAsUser: 2000 - equal: path: spec.template.spec.containers[0].securityContext value: allowPrivilegeEscalation: false capabilities: drop: - ALL readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 3000 seccompProfile: type: RuntimeDefault - it: should override hostNetwork set: hostNetwork: true asserts: - equal: path: spec.template.spec.hostNetwork value: true - it: should override metrics port set: metrics.listen.port: 8888 asserts: - equal: path: spec.template.spec.containers[0].args[1] value: "--metrics-addr=:8888" - it: should override image flavour set: image.repository: ghcr.io/external-secrets/external-secrets image.tag: v0.9.8 image.flavour: ubi-boringssl asserts: - equal: path: spec.template.spec.containers[0].image value: ghcr.io/external-secrets/external-secrets:v0.9.8-ubi-boringssl - it: should override image flavour set: image.repository: example.com/external-secrets/external-secrets image.tag: v0.9.9-ubi asserts: - equal: path: spec.template.spec.containers[0].image value: example.com/external-secrets/external-secrets:v0.9.9-ubi - it: should add a init container set: extraInitContainers: - name: foo image: example.com/external-secrets/init-image:{{ .Chart.Version }} restartPolicy: Always asserts: - equal: path: spec.template.spec.initContainers[0].name value: foo - matchRegex: path: spec.template.spec.initContainers[0].image pattern: ^example\.com/external-secrets/init-image:[0-9]+\.[0-9]+\.[0-9]+$ - equal: path: spec.template.spec.initContainers[0].restartPolicy value: Always - it: should override the deployment strategy set: strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 0 asserts: - equal: path: spec.strategy.rollingUpdate.maxSurge value: 1 - equal: path: spec.strategy.rollingUpdate.maxUnavailable value: 0 - it: should add livenessProbe if define set: livenessProbe: enabled: true initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 10 successThreshold: 10 httpGet: path: /healthz port: "8080" scheme: HTTP asserts: - equal: path: spec.template.spec.containers[0].livenessProbe.httpGet.port value: "8080"