From: srinivasyanamadala Date: Fri, 28 Mar 2025 07:48:54 +0000 (+0100) Subject: Updated helm configuration for s3p tests for phase 2 X-Git-Tag: 4.1.2~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F140582%2F3;p=policy%2Fdocker.git Updated helm configuration for s3p tests for phase 2 Issue-ID: POLICY-5221 Change-Id: I84c2b2a71566ea93fc812aa7340e2d5d9e89a84e Signed-off-by: srinivasyanamadala --- diff --git a/helm/policy/components/policy-opa-pdp/resources/config/config.json b/helm/policy/components/policy-opa-pdp/resources/config/config.json index f0adf0d2..8a3b9735 100755 --- a/helm/policy/components/policy-opa-pdp/resources/config/config.json +++ b/helm/policy/components/policy-opa-pdp/resources/config/config.json @@ -1,6 +1,6 @@ {{/* # ============LICENSE_START======================================================= -# Copyright (C) 2024 Deutsche Telekom Intellectual Property. All rights reserved. +# Copyright (C) 2024-2025 Deutsche Telekom Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,22 +21,6 @@ "logging": { "level": "debug" }, - "services": [ - { - "name": "opa-bundle-server", - "url": "http://policy-opa-pdp:8282/opa/bundles" - } - ], - "bundles": { - "opabundle": { - "service": "opa-bundle-server", - "resource": "bundle.tar.gz", - "polling": { - "min_delay_seconds": 60, - "max_delay_seconds": 120 - } - } - }, "decision_logs": { "console": true } diff --git a/helm/policy/components/policy-opa-pdp/resources/policies/policy-data.tar.gz b/helm/policy/components/policy-opa-pdp/resources/policies/policy-data.tar.gz deleted file mode 100755 index 572e9639..00000000 Binary files a/helm/policy/components/policy-opa-pdp/resources/policies/policy-data.tar.gz and /dev/null differ diff --git a/helm/policy/components/policy-opa-pdp/templates/configmap.yaml b/helm/policy/components/policy-opa-pdp/templates/configmap.yaml index 36ad7cf4..96e2a6c7 100755 --- a/helm/policy/components/policy-opa-pdp/templates/configmap.yaml +++ b/helm/policy/components/policy-opa-pdp/templates/configmap.yaml @@ -1,6 +1,6 @@ {{/* # ============LICENSE_START======================================================= -# Copyright (C) 2024 Deutsche Telekom Intellectual Property. All rights reserved. +# Copyright (C) 2024-2025 Deutsche Telekom Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,23 +18,6 @@ # ============LICENSE_END========================================================= */}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Chart.Name }}-configmap-policies-data - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: release - heritage: Helm - {{- with .Files.Glob "resources/policies/*" }} -binaryData: - {{- range $path, $bytes := . }} - {{ base $path }}: {{ $.Files.Get $path | b64enc | quote }} - {{- end }} - {{- end }} ---- apiVersion: v1 kind: ConfigMap metadata: diff --git a/helm/policy/components/policy-opa-pdp/templates/deployment.yaml b/helm/policy/components/policy-opa-pdp/templates/deployment.yaml index 2c5d8a6b..ece9dc3a 100755 --- a/helm/policy/components/policy-opa-pdp/templates/deployment.yaml +++ b/helm/policy/components/policy-opa-pdp/templates/deployment.yaml @@ -1,6 +1,6 @@ {{/* # ============LICENSE_START======================================================= -# Copyright (C) 2024 Deutsche Telekom Intellectual Property. All rights reserved. +# Copyright (C) 2024-2025 Deutsche Telekom Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -40,33 +40,9 @@ spec: release: release spec: initContainers: - - command: - - /bin/sh - args: - - -c - - | - echo "*** set right permissions to the different folders" - chown -R {{ .Values.permissions.uid }}:{{ .Values.permissions.gid }} /var/log; - chmod -R 755 /var/log - chown -R {{ .Values.permissions.uid }}:{{ .Values.permissions.gid }} /opt/; - chmod -R 755 /opt/* - tar -xvf /tmp/policies/policy-data.tar.gz -C /opt/ - image: busybox:latest - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - securityContext: - runAsUser: 1000 - runAsGroup: 1000 - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - name: {{ .Chart.Name }}-readiness - volumeMounts: - - name: logs - mountPath: /var/log - - name: tmp-policies-data - mountPath: /tmp/policies - - name : opa-policies-data - mountPath: /opt/ - + - name: {{ .Chart.Name }}-readiness + image: busybox + command: ["sh", "-c", "echo Init container started; sleep 10; echo Init container completed"] containers: - name: {{ .Chart.Name }} image: {{ .Values.global.repository }}/{{ .Values.global.image.opa }} @@ -97,13 +73,13 @@ spec: timeoutSeconds: {{ .Values.readiness.timeout }} env: - name: UseSASLForKAFKA - value: "{{ .Values.kafka.useSASL }}" + value: "{{ .Values.kafka.useSASL }}" - name: BOOSTSTRAP_SERVER value: "{{ .Values.kafka.brokers }}" - name: KAFKA_USERNAME value: "{{ .Values.kafka.username }}" - name: KAFKA_PASSWORD - value: "{{ .Values.kafka.password }}" + value: "{{ .Values.kafka.password }}" - name: LOG_LEVEL value: "{{ .Values.log.loglevel }}" - name: GROUPID @@ -111,14 +87,12 @@ spec: - name: TOPIC value: "{{ .Values.kafka.topic }}" volumeMounts: - - name: opa-policies-data - mountPath: /opt - name: opa-config mountPath: /app/config - name: opa-bundles mountPath: /app/bundles - name: logs - mountPath: /var/log + mountPath: /var/logs resources: {{ toYaml .Values.resources.small | indent 12 }} {{- if .Values.nodeSelector }} @@ -131,13 +105,6 @@ spec: {{- end }} serviceAccountName: {{ .Chart.Name }}-read volumes: - - name: tmp-policies-data - configMap: - name: {{ .Chart.Name }}-configmap-policies-data - defaultMode: 0755 - - name: opa-policies-data - persistentVolumeClaim: - claimName: {{ .Chart.Name }}-policies-data - name: opa-config configMap: name: {{ .Chart.Name }}-configmap-config diff --git a/helm/policy/components/policy-opa-pdp/templates/pvc.yaml b/helm/policy/components/policy-opa-pdp/templates/pvc.yaml deleted file mode 100755 index 6f0f7e1f..00000000 --- a/helm/policy/components/policy-opa-pdp/templates/pvc.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{/* -# ============LICENSE_START======================================================= -# Copyright (C) 2024 Deutsche Telekom Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= -*/}} - - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ .Chart.Name }}-policies-data - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: 13.0.1 - heritage: {{ .Release.Service }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: 5G - storageClassName: microk8s-hostpath - volumeMode: Filesystem - -