diff --git a/README.md b/README.md index 9c2050c..427f035 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ # Harness Docs Repo This repo (`harness-docs`) contains examples for Harness quickstarts and other documentation. +#testasasasassasaasasasaassasaasaasasas ## Links diff --git a/kustomize/helloWorld/appsettings.json b/kustomize/helloWorld/appsettings.json new file mode 100644 index 0000000..00ea3a0 --- /dev/null +++ b/kustomize/helloWorld/appsettings.json @@ -0,0 +1,4 @@ +{ + "altGreeting": "Good Morning!", + "enableRisky": "<+secrets.getValue("secret_id_1")>" +} diff --git a/kustomize/helloWorld/configMap.yaml b/kustomize/helloWorld/configMap.yaml deleted file mode 100644 index e335ab8..0000000 --- a/kustomize/helloWorld/configMap.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: the-map -data: - altGreeting: "Good Morning!" - enableRisky: "false" diff --git a/kustomize/helloWorld/deployment.yaml b/kustomize/helloWorld/deployment.yaml index 00e5eb9..e9e9a0b 100644 --- a/kustomize/helloWorld/deployment.yaml +++ b/kustomize/helloWorld/deployment.yaml @@ -14,7 +14,6 @@ spec: spec: containers: - name: the-container - image: monopole/hello:1 command: ["/hello", "--port=8080", "--enableRiskyFeature=$(ENABLE_RISKY)"] @@ -24,10 +23,10 @@ spec: - name: ALT_GREETING valueFrom: configMapKeyRef: - name: the-map + name: app-config key: altGreeting - name: ENABLE_RISKY valueFrom: configMapKeyRef: - name: the-map + name: app-config key: enableRisky diff --git a/kustomize/helloWorld/kustomization.yaml b/kustomize/helloWorld/kustomization.yaml index 8e68559..4f7d8ff 100644 --- a/kustomize/helloWorld/kustomization.yaml +++ b/kustomize/helloWorld/kustomization.yaml @@ -1,14 +1,20 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -# metadata: -# name: arbitrary -# Example configuration for the webserver -# at https://github.com/monopole/hello commonLabels: app: hello resources: -- deployment.yaml -- service.yaml -- configMap.yaml + - deployment.yaml + - service.yaml + +patches: + - path: patches/deploymentpatch.yaml + +configMapGenerator: + - name: app-config + files: + - appsettings.json + +generatorOptions: + disableNameSuffixHash: true diff --git a/kustomize/helloWorld/patches/deploymentpatch.yaml b/kustomize/helloWorld/patches/deploymentpatch.yaml new file mode 100644 index 0000000..d403b87 --- /dev/null +++ b/kustomize/helloWorld/patches/deploymentpatch.yaml @@ -0,0 +1,10 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: the-deployment +spec: + template: + spec: + containers: + - name: the-container + image: <+artifacts.primary.image>