diff --git a/charts/osm-arc/templates/metrics-agent-deployment.yaml b/charts/osm-arc/templates/metrics-agent-deployment.yaml index 9bda950a..d256f9af 100644 --- a/charts/osm-arc/templates/metrics-agent-deployment.yaml +++ b/charts/osm-arc/templates/metrics-agent-deployment.yaml @@ -21,6 +21,8 @@ spec: containers: - name: mdm image: linuxgeneva-microsoft.azurecr.io/genevamdm:master_20220401.1 + command: ["/bin/echo"] + args: ["$(EULA_CONTENT)"] imagePullPolicy: IfNotPresent resources: requests: @@ -40,11 +42,16 @@ spec: value: statsd_udp,statsd_tcp - name: MDM_LOG_LEVEL value: "Info" + - name: EULA_CONTENT + value: |- +{{ .Values.OpenServiceMesh.eulaContent | indent 16 }} volumeMounts: - name: mdm-config mountPath: /tmp/geneva_mdm - name: msi-adapter image: mcr.microsoft.com/azurearck8s/msi-adapter:1.0.0 + command: ["/bin/echo"] + args: ["$(EULA_CONTENT)"] imagePullPolicy: IfNotPresent resources: requests: @@ -68,12 +75,17 @@ spec: value: "true" - name: TEST_MODE value: "false" + - name: EULA_CONTENT + value: |- +{{ .Values.OpenServiceMesh.eulaContent | indent 16 }} securityContext: capabilities: add: - NET_ADMIN - name: prom-mdm-converter image: upstreamarc.azurecr.io/prom-mdm-converter:v1.0.0 + command: ["/bin/echo"] + args: ["$(EULA_CONTENT)"] imagePullPolicy: IfNotPresent resources: requests: @@ -91,8 +103,13 @@ spec: value: AzureServiceMesh - name: EXTENSION_RESOURCE_ID value: {{ .Values.Azure.Extension.ResourceId }} + - name: EULA_CONTENT + value: |- +{{ .Values.OpenServiceMesh.eulaContent | indent 16 }} - name: telegraf image: mcr.microsoft.com/oss/mirror/docker.io/library/telegraf:1.21 + command: ["/bin/echo"] + args: ["$(EULA_CONTENT)"] imagePullPolicy: IfNotPresent resources: requests: @@ -105,6 +122,10 @@ spec: - name: telegraf-conf mountPath: /etc/telegraf/telegraf.conf subPath: telegraf.conf + env: + - name: EULA_CONTENT + value: |- +{{ .Values.OpenServiceMesh.eulaContent | indent 16 }} volumes: - name: mdm-config configMap: diff --git a/charts/osm-arc/values.yaml b/charts/osm-arc/values.yaml index f7b66ac0..a1faae6f 100644 --- a/charts/osm-arc/values.yaml +++ b/charts/osm-arc/values.yaml @@ -14,6 +14,11 @@ Azure: OpenServiceMesh: ignoreNamespaces: "kube-system azure-arc arc-osm-system" testedDistros: "aks gke eks openshift rancher_rke" + eulaContent: |- + MICROSOFT SOFTWARE LICENSE TERMS + MICROSOFT Azure Arc for Kubernetes + __________________________________ + This software is licensed to you as part of your or your company's subscription license for Microsoft Azure Services. You may only use the software with Microsoft Azure Services and subject to the terms and conditions of the agreement under which you obtained Microsoft Azure Services. If you do not have an active subscription license for Microsoft Azure Services, you may not use the software. Microsoft Azure Legal Information: https://azure.microsoft.com/en-us/support/legal/ osm: osm: diff --git a/test/bats/test.bats b/test/bats/test.bats index 839a3de6..e428157e 100644 --- a/test/bats/test.bats +++ b/test/bats/test.bats @@ -62,6 +62,26 @@ ARC_CLUSTER=${ARC_CLUSTER:-true} assert_success } +@test "mdm container printed EULA" { + run wait_for_process $WAIT_TIME $SLEEP_TIME "kubectl logs -n arc-osm-system -l app=osm-metrics-agent -c mdm | grep -q \"MICROSOFT SOFTWARE LICENSE TERMS\"" + assert_success +} + +@test "msi-adapter container printed EULA" { + run wait_for_process $WAIT_TIME $SLEEP_TIME "kubectl logs -n arc-osm-system -l app=osm-metrics-agent -c msi-adapter | grep -q \"MICROSOFT SOFTWARE LICENSE TERMS\"" + assert_success +} + +@test "telegraf container printed EULA" { + run wait_for_process $WAIT_TIME $SLEEP_TIME "kubectl logs -n arc-osm-system -l app=osm-metrics-agent -c telegraf | grep -q \"MICROSOFT SOFTWARE LICENSE TERMS\"" + assert_success +} + +@test "prom-mdm-converter container printed EULA" { + run wait_for_process $WAIT_TIME $SLEEP_TIME "kubectl logs -n arc-osm-system -l app=osm-metrics-agent -c prom-mdm-converter | grep -q \"MICROSOFT SOFTWARE LICENSE TERMS\"" + assert_success +} + @test "mutating webhook has been deployed" { run wait_for_process $WAIT_TIME $SLEEP_TIME "kubectl get mutatingwebhookconfigurations.admissionregistration.k8s.io arc-osm-webhook-osm" assert_success