suite: Test deployment probes release: name: gitea-unittests namespace: testing templates: - templates/deployment.yaml - templates/secret_admin.yaml - templates/secret_config.yaml - templates/secret_gpg.yaml - templates/secret_init.yaml - templates/secret_inlineConfig.yaml - templates/secret_metrics.yaml tests: - it: "Render the default liveness probe" template: templates/deployment.yaml asserts: - notExists: path: spec.template.spec.containers[0].livenessProbe.enabled - isSubset: path: spec.template.spec.containers[0].livenessProbe content: failureThreshold: 10 initialDelaySeconds: 200 periodSeconds: 10 successThreshold: 1 tcpSocket: port: http timeoutSeconds: 1 - it: "Render the default readiness probe" template: templates/deployment.yaml asserts: - notExists: path: spec.template.spec.containers[0].readinessProbe.enabled - isSubset: path: spec.template.spec.containers[0].readinessProbe content: failureThreshold: 3 initialDelaySeconds: 5 periodSeconds: 10 successThreshold: 1 tcpSocket: port: http timeoutSeconds: 1 - it: "Skip the startup probe by default" template: templates/deployment.yaml asserts: - notExists: path: spec.template.spec.containers[0].startupProbe - it: "Render the startup probe when it is enabled" template: templates/deployment.yaml set: gitea.startupProbe.enabled: true asserts: - notExists: path: spec.template.spec.containers[0].startupProbe.enabled - isSubset: path: spec.template.spec.containers[0].startupProbe content: failureThreshold: 10 initialDelaySeconds: 60 periodSeconds: 10 successThreshold: 1 tcpSocket: port: http timeoutSeconds: 1 - it: "Overwrite the default port of the liveness probe" template: templates/deployment.yaml set: gitea: livenessProbe: tcpSocket: port: my-port asserts: - isSubset: path: spec.template.spec.containers[0].livenessProbe content: tcpSocket: port: my-port - it: "Overwrite the default port of the readiness probe" template: templates/deployment.yaml set: gitea: readinessProbe: tcpSocket: port: my-port asserts: - isSubset: path: spec.template.spec.containers[0].readinessProbe content: tcpSocket: port: my-port - it: "Overwrite the default port of the startup probe" template: templates/deployment.yaml set: gitea: startupProbe: enabled: true tcpSocket: port: my-port asserts: - isSubset: path: spec.template.spec.containers[0].startupProbe content: tcpSocket: port: my-port - it: "Use a non-default method as liveness probe" template: templates/deployment.yaml set: gitea: livenessProbe: httpGet: path: /api/healthz port: http initialDelaySeconds: 13371 timeoutSeconds: 13372 periodSeconds: 13373 successThreshold: 13374 failureThreshold: 13375 asserts: - notExists: path: spec.template.spec.containers[0].livenessProbe.tcpSocket - isSubset: path: spec.template.spec.containers[0].livenessProbe content: failureThreshold: 13375 initialDelaySeconds: 13371 periodSeconds: 13373 successThreshold: 13374 httpGet: path: /api/healthz port: http timeoutSeconds: 13372 - it: "Use a non-default method as readiness probe" template: templates/deployment.yaml set: gitea: readinessProbe: httpGet: path: /api/healthz port: http initialDelaySeconds: 13371 timeoutSeconds: 13372 periodSeconds: 13373 successThreshold: 13374 failureThreshold: 13375 asserts: - notExists: path: spec.template.spec.containers[0].readinessProbe.tcpSocket - isSubset: path: spec.template.spec.containers[0].readinessProbe content: failureThreshold: 13375 initialDelaySeconds: 13371 periodSeconds: 13373 successThreshold: 13374 httpGet: path: /api/healthz port: http timeoutSeconds: 13372 - it: "Use a non-default method as startup probe" template: templates/deployment.yaml set: gitea: startupProbe: enabled: true httpGet: path: /api/healthz port: http initialDelaySeconds: 13371 timeoutSeconds: 13372 periodSeconds: 13373 successThreshold: 13374 failureThreshold: 13375 asserts: - notExists: path: spec.template.spec.containers[0].startupProbe.tcpSocket - isSubset: path: spec.template.spec.containers[0].startupProbe content: failureThreshold: 13375 initialDelaySeconds: 13371 periodSeconds: 13373 successThreshold: 13374 httpGet: path: /api/healthz port: http timeoutSeconds: 13372