diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 7ed7716..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "yaml.schemas": { - "https://raw.githubusercontent.com/helm-unittest/helm-unittest/v0.5.2/schema/helm-testsuite.json": [ - "/unittests/**/*.yaml" - ] - }, - "yaml.schemaStore.enable": true -} \ No newline at end of file diff --git a/templates/athens-proxy/_common.tpl b/templates/_common.tpl similarity index 100% rename from templates/athens-proxy/_common.tpl rename to templates/_common.tpl diff --git a/templates/athens-proxy/_configMap.tpl b/templates/_configMap.tpl similarity index 100% rename from templates/athens-proxy/_configMap.tpl rename to templates/_configMap.tpl diff --git a/templates/athens-proxy/_deployment.tpl b/templates/_deployment.tpl similarity index 100% rename from templates/athens-proxy/_deployment.tpl rename to templates/_deployment.tpl diff --git a/templates/athens-proxy/_hpa.tpl b/templates/_hpa.tpl similarity index 100% rename from templates/athens-proxy/_hpa.tpl rename to templates/_hpa.tpl diff --git a/templates/athens-proxy/_ingress.tpl b/templates/_ingress.tpl similarity index 100% rename from templates/athens-proxy/_ingress.tpl rename to templates/_ingress.tpl diff --git a/templates/athens-proxy/_networkPolicies.tpl b/templates/_networkPolicies.tpl similarity index 100% rename from templates/athens-proxy/_networkPolicies.tpl rename to templates/_networkPolicies.tpl diff --git a/templates/athens-proxy/_persistentVolumeClaim.tpl b/templates/_persistentVolumeClaim.tpl similarity index 100% rename from templates/athens-proxy/_persistentVolumeClaim.tpl rename to templates/_persistentVolumeClaim.tpl diff --git a/templates/athens-proxy/_pod.tpl b/templates/_pod.tpl similarity index 100% rename from templates/athens-proxy/_pod.tpl rename to templates/_pod.tpl diff --git a/templates/athens-proxy/_secrets.tpl b/templates/_secrets.tpl similarity index 100% rename from templates/athens-proxy/_secrets.tpl rename to templates/_secrets.tpl diff --git a/templates/athens-proxy/_serviceAccount.tpl b/templates/_serviceAccount.tpl similarity index 100% rename from templates/athens-proxy/_serviceAccount.tpl rename to templates/_serviceAccount.tpl diff --git a/templates/athens-proxy/_services.tpl b/templates/_services.tpl similarity index 100% rename from templates/athens-proxy/_services.tpl rename to templates/_services.tpl diff --git a/templates/athens-proxy/configMapDownloadMode.yaml b/templates/configMapDownloadMode.yaml similarity index 100% rename from templates/athens-proxy/configMapDownloadMode.yaml rename to templates/configMapDownloadMode.yaml diff --git a/templates/athens-proxy/configMapGitConfig.yaml b/templates/configMapGitConfig.yaml similarity index 100% rename from templates/athens-proxy/configMapGitConfig.yaml rename to templates/configMapGitConfig.yaml diff --git a/templates/athens-proxy/deployment.yaml b/templates/deployment.yaml similarity index 100% rename from templates/athens-proxy/deployment.yaml rename to templates/deployment.yaml diff --git a/templates/athens-proxy/hpa.yaml b/templates/hpa.yaml similarity index 100% rename from templates/athens-proxy/hpa.yaml rename to templates/hpa.yaml diff --git a/templates/athens-proxy/ingress.yaml b/templates/ingress.yaml similarity index 100% rename from templates/athens-proxy/ingress.yaml rename to templates/ingress.yaml diff --git a/templates/athens-proxy/networkPolicies.yaml b/templates/networkPolicies.yaml similarity index 100% rename from templates/athens-proxy/networkPolicies.yaml rename to templates/networkPolicies.yaml diff --git a/templates/athens-proxy/persistentVolumeClaim.yaml b/templates/persistentVolumeClaim.yaml similarity index 100% rename from templates/athens-proxy/persistentVolumeClaim.yaml rename to templates/persistentVolumeClaim.yaml diff --git a/templates/athens-proxy/secretEnv.yaml b/templates/secretEnv.yaml similarity index 100% rename from templates/athens-proxy/secretEnv.yaml rename to templates/secretEnv.yaml diff --git a/templates/athens-proxy/secretNetRC.yaml b/templates/secretNetRC.yaml similarity index 100% rename from templates/athens-proxy/secretNetRC.yaml rename to templates/secretNetRC.yaml diff --git a/templates/athens-proxy/secretSSH.yaml b/templates/secretSSH.yaml similarity index 100% rename from templates/athens-proxy/secretSSH.yaml rename to templates/secretSSH.yaml diff --git a/templates/athens-proxy/serviceAccount.yaml b/templates/serviceAccount.yaml similarity index 100% rename from templates/athens-proxy/serviceAccount.yaml rename to templates/serviceAccount.yaml diff --git a/templates/athens-proxy/serviceHTTP.yaml b/templates/serviceHTTP.yaml similarity index 100% rename from templates/athens-proxy/serviceHTTP.yaml rename to templates/serviceHTTP.yaml diff --git a/unittests/configMaps/downloadMode.yaml b/unittests/configMaps/downloadMode.yaml index c48d452..963a63b 100644 --- a/unittests/configMaps/downloadMode.yaml +++ b/unittests/configMaps/downloadMode.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/configMapDownloadMode.yaml +- templates/configMapDownloadMode.yaml tests: - it: Skip rending by using existing config map. set: diff --git a/unittests/configMaps/gitConfig.yaml b/unittests/configMaps/gitConfig.yaml index 6265901..a965e5a 100644 --- a/unittests/configMaps/gitConfig.yaml +++ b/unittests/configMaps/gitConfig.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/configMapGitConfig.yaml +- templates/configMapGitConfig.yaml tests: - it: Skip rending by using existing config map. set: diff --git a/unittests/deployment/deployment.yaml b/unittests/deployment/deployment.yaml index 17c6b79..d256bf7 100644 --- a/unittests/deployment/deployment.yaml +++ b/unittests/deployment/deployment.yaml @@ -6,22 +6,22 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/deployment.yaml +- templates/deployment.yaml tests: - it: Rendering default asserts: - hasDocuments: count: 1 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - containsDocument: apiVersion: apps/v1 kind: Deployment name: athens-proxy-unittest namespace: testing - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: metadata.annotations - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: metadata.labels value: @@ -30,11 +30,11 @@ tests: app.kubernetes.io/name: athens-proxy app.kubernetes.io/version: 0.1.0 helm.sh/chart: athens-proxy-0.1.0 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.replicas value: 1 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.template.metadata.labels value: @@ -43,74 +43,74 @@ tests: app.kubernetes.io/name: athens-proxy app.kubernetes.io/version: 0.1.0 helm.sh/chart: athens-proxy-0.1.0 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.affinity - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.containers[0].args - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.containers[0].command - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.containers[0].envFrom - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.containers[0].volumeMounts - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.template.spec.containers[0].image value: docker.io/gomods/athens:0.1.0 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.template.spec.containers[0].imagePullPolicy value: IfNotPresent - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.containers[0].resources - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.containers[0].securityContext - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.dnsConfig - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.dnsPolicy - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.hostname - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.template.spec.hostNetwork value: false - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.imagePullSecrets - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.nodeSelector - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.priorityClassName - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.restartPolicy - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.subdomain - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.template.spec.terminationGracePeriodSeconds value: 60 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.tolerations - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - notExists: path: spec.template.spec.topologySpreadConstraints - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.strategy value: @@ -118,7 +118,7 @@ tests: rollingUpdate: maxSurge: 1 maxUnavailable: 1 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test custom replicas set: @@ -130,7 +130,7 @@ tests: - equal: path: spec.replicas value: 3 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test custom affinity set: @@ -160,7 +160,7 @@ tests: values: - antarctica-east1 - antarctica-west1 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test additional arguments set: @@ -176,7 +176,7 @@ tests: value: - --foo=bar - --bar=foo - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test additional command set: @@ -194,7 +194,7 @@ tests: - "/bin/sh" - "-c" - "echo hello" - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test custom imageRegistry and imageRepository set: @@ -207,7 +207,7 @@ tests: - equal: path: spec.template.spec.containers[0].image value: registry.example.local/path/special/athens-proxy:0.1.0 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test custom imagePullPolicy set: @@ -219,7 +219,7 @@ tests: - equal: path: spec.template.spec.containers[0].imagePullPolicy value: Always - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test custom resource limits and requests set: @@ -242,7 +242,7 @@ tests: resourceFieldRef: divisor: "1" resource: limits.cpu - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.template.spec.containers[0].resources value: @@ -252,7 +252,7 @@ tests: requests: cpu: 25m memory: 100MB - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test custom securityContext set: @@ -282,7 +282,7 @@ tests: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test dnsConfig set: @@ -300,7 +300,7 @@ tests: nameservers: - "8.8.8.8" - "8.8.4.4" - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test dnsPolicy set: @@ -312,7 +312,7 @@ tests: - equal: path: spec.template.spec.dnsPolicy value: ClusterFirst - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test hostNetwork, hostname, subdomain set: @@ -326,15 +326,15 @@ tests: - equal: path: spec.template.spec.hostNetwork value: true - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.template.spec.hostname value: pg-exporter - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - equal: path: spec.template.spec.subdomain value: exporters.internal - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test imagePullSecrets set: @@ -350,7 +350,7 @@ tests: value: - name: my-pull-secret - name: my-special-secret - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test nodeSelector set: @@ -364,7 +364,7 @@ tests: path: spec.template.spec.nodeSelector value: foo: bar - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test priorityClassName set: @@ -376,7 +376,7 @@ tests: - equal: path: spec.template.spec.priorityClassName value: my-priority - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test restartPolicy set: @@ -388,7 +388,7 @@ tests: - equal: path: spec.template.spec.restartPolicy value: Always - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test terminationGracePeriodSeconds set: @@ -400,7 +400,7 @@ tests: - equal: path: spec.template.spec.terminationGracePeriodSeconds value: 120 - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test tolerations set: @@ -420,7 +420,7 @@ tests: operator: Equal value: postgres effect: NoSchedule - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test topologySpreadConstraints set: @@ -442,7 +442,7 @@ tests: labelSelector: matchLabels: app.kubernetes.io/instance: athens-proxy - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test additional volumeMounts and volumes set: @@ -462,4 +462,4 @@ tests: value: - name: data mountPath: /usr/lib/athens-proxy/data - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml diff --git a/unittests/deployment/downloadMode.yaml b/unittests/deployment/downloadMode.yaml index dc0946b..5c010b5 100644 --- a/unittests/deployment/downloadMode.yaml +++ b/unittests/deployment/downloadMode.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/deployment.yaml +- templates/deployment.yaml tests: - it: Rendering default without mounted download mode config map asserts: diff --git a/unittests/deployment/gitConfig.yaml b/unittests/deployment/gitConfig.yaml index ca7b8ac..eb4580f 100644 --- a/unittests/deployment/gitConfig.yaml +++ b/unittests/deployment/gitConfig.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/deployment.yaml +- templates/deployment.yaml tests: - it: Rendering default without mounted git config map asserts: diff --git a/unittests/deployment/netrc.yaml b/unittests/deployment/netrc.yaml index 4190e74..48ef67d 100644 --- a/unittests/deployment/netrc.yaml +++ b/unittests/deployment/netrc.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/deployment.yaml +- templates/deployment.yaml tests: - it: Rendering default without mounted netrc secret asserts: diff --git a/unittests/deployment/persistentVolumeClaim.yaml b/unittests/deployment/persistentVolumeClaim.yaml index d851bb8..20ec7f3 100644 --- a/unittests/deployment/persistentVolumeClaim.yaml +++ b/unittests/deployment/persistentVolumeClaim.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/deployment.yaml +- templates/deployment.yaml tests: - it: Test persistent volume claim set: @@ -17,26 +17,26 @@ tests: content: name: ATHENS_STORAGE_TYPE value: disk - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - contains: path: spec.template.spec.containers[0].env content: name: ATHENS_DISK_STORAGE_ROOT value: /var/www/athens-proxy/data - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - contains: path: spec.template.spec.containers[0].volumeMounts content: name: data mountPath: /var/www/athens-proxy/data - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - contains: path: spec.template.spec.volumes content: name: data persistentVolumeClaim: claimName: athens-proxy-unittest-data - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - it: Test existing persistent volume claim set: @@ -51,23 +51,23 @@ tests: content: name: ATHENS_STORAGE_TYPE value: disk - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - contains: path: spec.template.spec.containers[0].env content: name: ATHENS_DISK_STORAGE_ROOT value: /mnt/go-proxy/data - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - contains: path: spec.template.spec.containers[0].volumeMounts content: name: data mountPath: /mnt/go-proxy/data - template: templates/athens-proxy/deployment.yaml + template: templates/deployment.yaml - contains: path: spec.template.spec.volumes content: name: data persistentVolumeClaim: claimName: my-special-pvc - template: templates/athens-proxy/deployment.yaml \ No newline at end of file + template: templates/deployment.yaml \ No newline at end of file diff --git a/unittests/deployment/ssh.yaml b/unittests/deployment/ssh.yaml index 59aee68..a128cc9 100644 --- a/unittests/deployment/ssh.yaml +++ b/unittests/deployment/ssh.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/deployment.yaml +- templates/deployment.yaml tests: - it: Rendering default without mounted ssh secret asserts: diff --git a/unittests/hpa/default.yaml b/unittests/hpa/default.yaml index 2e5dd0c..968321d 100644 --- a/unittests/hpa/default.yaml +++ b/unittests/hpa/default.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/hpa.yaml +- templates/hpa.yaml tests: - it: Skip rendering by default. asserts: diff --git a/unittests/ingress/ingress.yaml b/unittests/ingress/ingress.yaml index 03d0594..337e0ac 100644 --- a/unittests/ingress/ingress.yaml +++ b/unittests/ingress/ingress.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/ingress.yaml +- templates/ingress.yaml tests: - it: Skip ingress by default. asserts: diff --git a/unittests/networkPolicies/default.yaml b/unittests/networkPolicies/default.yaml index ed5deb5..fe8067b 100644 --- a/unittests/networkPolicies/default.yaml +++ b/unittests/networkPolicies/default.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/networkPolicies.yaml +- templates/networkPolicies.yaml tests: - it: Skip networkPolicies in general disabled. set: diff --git a/unittests/persistentVolumeClaim/persistentVolumeClaim.yaml b/unittests/persistentVolumeClaim/persistentVolumeClaim.yaml index fd411f3..48743dc 100644 --- a/unittests/persistentVolumeClaim/persistentVolumeClaim.yaml +++ b/unittests/persistentVolumeClaim/persistentVolumeClaim.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/persistentVolumeClaim.yaml +- templates/persistentVolumeClaim.yaml tests: - it: Rendering default asserts: diff --git a/unittests/secrets/env.yaml b/unittests/secrets/env.yaml index f9da139..aad2f9c 100644 --- a/unittests/secrets/env.yaml +++ b/unittests/secrets/env.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/secretEnv.yaml +- templates/secretEnv.yaml tests: - it: Skip rendering by using existing secret. set: diff --git a/unittests/secrets/netrc.yaml b/unittests/secrets/netrc.yaml index 147d553..d47373c 100644 --- a/unittests/secrets/netrc.yaml +++ b/unittests/secrets/netrc.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/secretNetRC.yaml +- templates/secretNetRC.yaml tests: - it: Skip rendering by default asserts: diff --git a/unittests/secrets/ssh.yaml b/unittests/secrets/ssh.yaml index a4d0be0..fee31b9 100644 --- a/unittests/secrets/ssh.yaml +++ b/unittests/secrets/ssh.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/secretSSH.yaml +- templates/secretSSH.yaml tests: - it: Skip rendering by using existing secret. set: diff --git a/unittests/serviceAccounts/serviceAccount.yaml b/unittests/serviceAccounts/serviceAccount.yaml index 3ede81f..c3b682c 100644 --- a/unittests/serviceAccounts/serviceAccount.yaml +++ b/unittests/serviceAccounts/serviceAccount.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/serviceAccount.yaml +- templates/serviceAccount.yaml tests: - it: Skip rendering. set: diff --git a/unittests/services/http.yaml b/unittests/services/http.yaml index 7ec2fed..3d3cf42 100644 --- a/unittests/services/http.yaml +++ b/unittests/services/http.yaml @@ -6,7 +6,7 @@ release: name: athens-proxy-unittest namespace: testing templates: -- templates/athens-proxy/serviceHTTP.yaml +- templates/serviceHTTP.yaml tests: - it: Skip service when disabled. set: