From 103ee23ca2316d07878d90ebd1438e609ab7d772 Mon Sep 17 00:00:00 2001 From: Bence Csati Date: Thu, 16 May 2024 10:34:39 +0200 Subject: [PATCH] refactor: remove unused test files Signed-off-by: Bence Csati --- test/deploy/test-configmap-dev.yaml | 20 ------ test/deploy/test-configmap.yaml | 15 ----- test/deploy/test-cronjob.yaml | 24 ------- test/deploy/test-custom-resource.yaml | 46 ------------- test/deploy/test-deploy-ct.yaml | 52 -------------- test/deploy/test-deploy-templating.yaml | 75 --------------------- test/deploy/test-deploy-va.yaml | 57 ---------------- test/deploy/test-deployment-env-from.yaml | 26 ------- test/deploy/test-deployment-gcp.yaml | 61 ----------------- test/deploy/test-deployment-seccontext.yaml | 45 ------------- test/deploy/test-deployment.yaml | 53 --------------- test/deploy/test-dynamic-env-vars.yaml | 35 ---------- test/deploy/test-secret.yaml | 15 ----- test/deploy/vault-pipeline-feature.yaml | 27 -------- test/kind.yaml | 2 +- test/prometheus.yaml | 13 ---- 16 files changed, 1 insertion(+), 565 deletions(-) delete mode 100644 test/deploy/test-configmap-dev.yaml delete mode 100644 test/deploy/test-configmap.yaml delete mode 100644 test/deploy/test-cronjob.yaml delete mode 100644 test/deploy/test-custom-resource.yaml delete mode 100644 test/deploy/test-deploy-ct.yaml delete mode 100644 test/deploy/test-deploy-templating.yaml delete mode 100644 test/deploy/test-deploy-va.yaml delete mode 100644 test/deploy/test-deployment-env-from.yaml delete mode 100644 test/deploy/test-deployment-gcp.yaml delete mode 100644 test/deploy/test-deployment-seccontext.yaml delete mode 100644 test/deploy/test-deployment.yaml delete mode 100644 test/deploy/test-dynamic-env-vars.yaml delete mode 100644 test/deploy/test-secret.yaml delete mode 100644 test/deploy/vault-pipeline-feature.yaml delete mode 100644 test/prometheus.yaml diff --git a/test/deploy/test-configmap-dev.yaml b/test/deploy/test-configmap-dev.yaml deleted file mode 100644 index e15ea4b6..00000000 --- a/test/deploy/test-configmap-dev.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Useful for local development with a Vault dev server: -# -# vault server -dev -# export VAULT_ADDR='http://127.0.0.1:8200' -# vault kv put secret/database/test username=joska -# -# make -j webhook-up -# -# kubectl apply -f test/deploy/test-configmap-dev.yaml -# kubectl get configmap configmap-dev -o yaml -# -apiVersion: v1 -kind: ConfigMap -metadata: - name: configmap-dev - annotations: - secrets-webhook.security.bank-vaults.io/vault-addr: "http://localhost:8200" -data: - plain: vault:secret/data/database/test#username - template: user=${vault:secret/data/database/test#username} diff --git a/test/deploy/test-configmap.yaml b/test/deploy/test-configmap.yaml deleted file mode 100644 index 521e609b..00000000 --- a/test/deploy/test-configmap.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: sample-configmap - annotations: - secrets-webhook.security.bank-vaults.io/vault-addr: "https://vault.default.svc.cluster.local:8200" - secrets-webhook.security.bank-vaults.io/vault-role: "default" - secrets-webhook.security.bank-vaults.io/vault-skip-verify: "true" - secrets-webhook.security.bank-vaults.io/vault-path: "kubernetes" -data: - aws-access-key-id: vault:secret/data/accounts/aws#AWS_ACCESS_KEY_ID - aws-access-key-id-formatted: "vault:secret/data/accounts/aws#AWS key in base64: ${.AWS_ACCESS_KEY_ID | b64enc}" - aws-access-key-id-inline: "AWS_ACCESS_KEY_ID: ${vault:secret/data/accounts/aws#AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY: ${vault:secret/data/accounts/aws#AWS_SECRET_ACCESS_KEY}" -binaryData: - aws-access-key-id-binary: dmF1bHQ6c2VjcmV0L2RhdGEvYWNjb3VudHMvYXdzI0FXU19BQ0NFU1NfS0VZX0lE diff --git a/test/deploy/test-cronjob.yaml b/test/deploy/test-cronjob.yaml deleted file mode 100644 index 93a64af8..00000000 --- a/test/deploy/test-cronjob.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: hello -spec: - schedule: "*/1 * * * *" - jobTemplate: - spec: - template: - metadata: - labels: - app.kubernetes.io/name: hello-secrets - annotations: - secrets-webhook.security.bank-vaults.io/vault-addr: "https://vault:8200" - secrets-webhook.security.bank-vaults.io/vault-tls-secret: vault-tls - spec: - containers: - - name: alpine - image: alpine - command: ["sh", "-c", "echo $AWS_SECRET_ACCESS_KEY"] - env: - - name: AWS_SECRET_ACCESS_KEY - value: vault:secret/data/accounts/aws#${.AWS_SECRET_ACCESS_KEY} # Go templates are also supported with ${} delimiters - restartPolicy: OnFailure \ No newline at end of file diff --git a/test/deploy/test-custom-resource.yaml b/test/deploy/test-custom-resource.yaml deleted file mode 100644 index 15fcdcd4..00000000 --- a/test/deploy/test-custom-resource.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration -metadata: - name: "pod-policy.example.com" - annotations: - secrets-webhook.security.bank-vaults.io/vault-addr: "https://vault.default:8200" - secrets-webhook.security.bank-vaults.io/vault-role: "default" - secrets-webhook.security.bank-vaults.io/vault-skip-verify: "true" - secrets-webhook.security.bank-vaults.io/vault-path: "kubernetes" -webhooks: -- name: "pod-policy.example.com" - rules: - - apiGroups: [""] - apiVersions: ["v1"] - operations: ["CREATE"] - resources: ["pods"] - scope: "Namespaced" - clientConfig: - service: - namespace: "example-namespace" - name: "example-service" - # base64-encoded PEM bundle containing the CA that signed the webhook's serving certificate - caBundle: "dmF1bHQ6cGtpL2NlcnQvMToyOjM6NCNjYQ==" # "vault:pki/cert/1:2:3:4#ca" - admissionReviewVersions: ["v1beta1"] - timeoutSeconds: 5 - ---- - -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: test-ingress - annotations: - nginx.ingress.kubernetes.io/rewrite-target: / - secrets-webhook.security.bank-vaults.io/vault-addr: "https://vault.default:8200" - secrets-webhook.security.bank-vaults.io/vault-role: "default" - secrets-webhook.security.bank-vaults.io/vault-skip-verify: "true" - secrets-webhook.security.bank-vaults.io/vault-path: "kubernetes" -spec: - rules: - - http: - paths: - - path: /testpath - backend: - serviceName: test - servicePort: 80 diff --git a/test/deploy/test-deploy-ct.yaml b/test/deploy/test-deploy-ct.yaml deleted file mode 100644 index bdbdd3ac..00000000 --- a/test/deploy/test-deploy-ct.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: consul-template-pki -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: consul-template-pki - template: - metadata: - labels: - app.kubernetes.io/name: consul-template-pki - annotations: - secrets-webhook.security.bank-vaults.io/vault-addr: "https://vault:8200" - secrets-webhook.security.bank-vaults.io/vault-tls-secret: vault-tls - secrets-webhook.security.bank-vaults.io/vault-ct-configmap: consul-template-pki - spec: - containers: - - name: alpine - image: alpine - command: ["sh", "-c", "apk add openssl; while true; do openssl x509 -text -noout -in /vault/secrets/my-server.crt; echo; sleep 5; done"] - resources: - limits: - memory: "128Mi" - cpu: "100m" - ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: consul-template-pki - labels: - app.kubernetes.io/name: consul-template-pki -data: - config.hcl: | - vault { - ssl { - ca_cert = "/vault/tls/ca.crt" - } - retry { - backoff = "1s" - } - } - template { - contents = <