diff --git a/README.md b/README.md index a084b72..f37d5d7 100755 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Learn about the capabilities of this extension in our [Reliability Hub](https:// | `AZURE_TENANT_ID` | azure.tenantID | Azure Tenant ID | true | | | `AZURE_CLIENT_SECRET` | azure.clientSecret | Azure Client Secret | false | | | `AZURE_SUBSCRIPTION_ID` | azure.subscriptionID | Azure Subscription ID | false | | -| `STEADYBIT_EXTENSION_AZURE_CERTIFICATE_PATH` | azure.certificatePath | Location of a certificate used to authenticate to azure | false | | +| `STEADYBIT_EXTENSION_AZURE_CERTIFICATE_PATH` | azure.certificatePath | Location of a certificate used to authenticate to azure | false | | | `STEADYBIT_EXTENSION_AZURE_CERTIFICATE_PASSWORD` | azure.certificatePassword | Passphrase for the certificate used to authenticate to azure | false | | @@ -46,6 +46,9 @@ helm upgrade steadybit-extension-azure \ --timeout 5m0s \ --create-namespace \ --namespace steadybit-extension \ + --set azure.clientID=YOUR_CLIENT_ID \ + --set azure.clientSecret=YOUR_CLIENT_SECRET \ + --set azure.tenantID=YOUR_TENANT_ID \ steadybit-extension-azure/steadybit-extension-azure ``` diff --git a/charts/steadybit-extension-azure/Chart.yaml b/charts/steadybit-extension-azure/Chart.yaml index e9d3c0b..b5bd1fb 100644 --- a/charts/steadybit-extension-azure/Chart.yaml +++ b/charts/steadybit-extension-azure/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: steadybit-extension-azure description: Steadybit scaffold extension Helm chart for Kubernetes. -version: 1.0.2 +version: 1.0.3 appVersion: latest home: https://www.steadybit.com/ icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png diff --git a/charts/steadybit-extension-azure/templates/secret.yaml b/charts/steadybit-extension-azure/templates/secret.yaml new file mode 100644 index 0000000..57df1b1 --- /dev/null +++ b/charts/steadybit-extension-azure/templates/secret.yaml @@ -0,0 +1,20 @@ +{{- if not .Values.azure.existingSecret -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "azure.secret.name" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- range $key, $value := .Values.extraLabels }} + {{ $key }}: {{ $value }} + {{- end }} +type: Opaque +data: + clientID: {{ .Values.azure.clientID | b64enc | quote }} + clientSecret: {{ .Values.azure.clientSecret | b64enc | quote }} + tenantID: {{ .Values.azure.tenantID | b64enc | quote }} + subscriptionID: {{ .Values.azure.subscriptionID | b64enc | quote }} + certificatePath: {{ .Values.azure.certificatePath | b64enc | quote }} + certificatePassword: {{ .Values.azure.certificatePassword | b64enc | quote }} + userAssertionString: {{ .Values.azure.userAssertionString | b64enc | quote }} +{{- end }} diff --git a/charts/steadybit-extension-azure/tests/deployment_test.yaml b/charts/steadybit-extension-azure/tests/deployment_test.yaml index dfd27da..37bc87f 100644 --- a/charts/steadybit-extension-azure/tests/deployment_test.yaml +++ b/charts/steadybit-extension-azure/tests/deployment_test.yaml @@ -78,6 +78,8 @@ tests: - it: manifest should match snapshot with azure certificates vars set: azure: + clientID: "clientId" + tenantID: "tenantId" certificatePath: "/tmp/certificatePath" certificatePassword: "certificatePassword" asserts: diff --git a/charts/steadybit-extension-azure/values.yaml b/charts/steadybit-extension-azure/values.yaml index 58b9b97..4c60aa1 100644 --- a/charts/steadybit-extension-azure/values.yaml +++ b/charts/steadybit-extension-azure/values.yaml @@ -93,12 +93,12 @@ extraEnv: [] extraEnvFrom: [] azure: - clientID: null - clientSecret: null - tenantID: null - subscriptionID: null - certificatePath: null - certificatePassword: null - userAssertionString: null + clientID: "" + clientSecret: "" + tenantID: "" + subscriptionID: "" + certificatePath: "" + certificatePassword: "" + userAssertionString: "" # azure.existingSecret -- If defined, will skip secret creation and instead assume that the referenced secret contains the keys clientID, clientSecret, tenantID, subscriptionID, certificatePath, certificatePassword, userAssertionString existingSecret: null diff --git a/e2e/integration_test.go b/e2e/integration_test.go index 46fc8f8..fec55d6 100644 --- a/e2e/integration_test.go +++ b/e2e/integration_test.go @@ -19,7 +19,10 @@ func TestWithMinikube(t *testing.T) { Name: "extension-azure", Port: 8092, ExtraArgs: func(m *e2e.Minikube) []string { - return []string{"--set", "logging.level=debug"} + return []string{ + "--set", "logging.level=debug", + "--set", "azure.level=debug", + } }, }