summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'asdc-controller/src/test/resources')
-rw-r--r--asdc-controller/src/test/resources/resource-examples/ccvpn/demo-ccvpn-notification.json54
-rw-r--r--asdc-controller/src/test/resources/resource-examples/ccvpn/service-Ccvpnservice-csar.csarbin0 -> 55786 bytes
-rw-r--r--asdc-controller/src/test/resources/resource-examples/ccvpn/service-Sdwan-csar.csarbin45576 -> 0 bytes
3 files changed, 22 insertions, 32 deletions
diff --git a/asdc-controller/src/test/resources/resource-examples/ccvpn/demo-ccvpn-notification.json b/asdc-controller/src/test/resources/resource-examples/ccvpn/demo-ccvpn-notification.json
index bc7d7d7979..1ca96f7dc9 100644
--- a/asdc-controller/src/test/resources/resource-examples/ccvpn/demo-ccvpn-notification.json
+++ b/asdc-controller/src/test/resources/resource-examples/ccvpn/demo-ccvpn-notification.json
@@ -1,31 +1,31 @@
{
- "distributionID": "cbc7ab24-7d96-4cb5-949c-f23ada265513",
- "serviceName": "SDWAN",
- "serviceVersion": "2.0",
- "serviceUUID": "5c4d4793-67fb-4155-b7d8-60ec011138c9",
- "serviceDescription": "SDWAN Service",
- "serviceInvariantUUID": "e830c260-ee21-4830-980c-c802cd9bbb1c",
+ "distributionID": "8a01603d-606d-4e40-8bc4-37107ad97897",
+ "serviceName": "CCVPNService",
+ "serviceVersion": "1.0",
+ "serviceUUID": "317887d3-a4e4-45cb-8971-2a78426fefac",
+ "serviceDescription": "CCVPN",
+ "serviceInvariantUUID": "e43f9b81-3035-44df-b618-a787e1c49427",
"resources": [
{
- "resourceInstanceName": "siteVF 0",
- "resourceName": "siteVF",
+ "resourceInstanceName": "siteResource",
+ "resourceCustomizationUUID": "e9e01777-bb2f-42f0-b825-aef0f4c37ccf",
+ "resourceName": "siteResource",
"resourceVersion": "1.0",
"resoucreType": "VF",
- "resourceUUID": "2c10d85c-e492-4813-a2d6-d1fab757fe49",
- "resourceInvariantUUID": "ed9b1fe5-1e94-4974-a48f-389571837fd6",
- "resourceCustomizationUUID": "33de5105-edf3-48cb-bda0-37b2aa2f681f",
+ "resourceUUID": "5a641276-443b-45ca-ac9c-a0ee84f5007b",
+ "resourceInvariantUUID": "5338673f-df81-483a-afa4-b9766442ebf1",
"category": "Configuration",
"subcategory": "Configuration",
"artifacts": []
},
{
- "resourceInstanceName": "vpn 0",
- "resourceName": "vpn",
- "resourceVersion": "2.0",
+ "resourceInstanceName": "SDWANVPNResource",
+ "resourceCustomizationUUID": "7815f32c-bdbf-41f7-9a18-6f0e6d5a0d0e",
+ "resourceName": "SDWANVPNResource",
+ "resourceVersion": "1.0",
"resoucreType": "VF",
- "resourceUUID": "235861f1-ea93-4443-94fa-82f29903f54f",
- "resourceInvariantUUID": "c4eff5e7-c4fe-4caf-989b-11efc8e42a73",
- "resourceCustomizationUUID": "faa89d44-329b-4fcb-a5dc-6e6f84946537",
+ "resourceUUID": "5f9f2164-f7e4-461d-b8de-3470297ce2b3",
+ "resourceInvariantUUID": "5ca15886-9990-419c-a4bb-f0229eac0926",
"category": "Configuration",
"subcategory": "Configuration",
"artifacts": []
@@ -33,24 +33,14 @@
],
"serviceArtifacts": [
{
- "artifactName": "service-Sdwan-template.yml",
- "artifactType": "TOSCA_TEMPLATE",
- "artifactURL": "/sdc/v1/catalog/services/Sdwan/2.0/artifacts/service-Sdwan-template.yml",
- "artifactChecksum": "Zjg4MmJmNzI1MTliYzBiZjA2ZmJjN2EwNzZhZTcxYTQ=",
- "artifactDescription": "TOSCA representation of the asset",
- "artifactTimeout": 0,
- "artifactUUID": "5e7beb91-61f9-4613-8cc5-1d288a624abb",
- "artifactVersion": "2"
- },
- {
- "artifactName": "service-Sdwan-csar.csar",
+ "artifactName": "service-Ccvpnservice-csar.csar",
"artifactType": "TOSCA_CSAR",
- "artifactURL": "/service-Sdwan-csar.csar",
- "artifactChecksum": "ODA1ZGViMzI0NzIxMmRmNTIzYzE0ZTg5NmExYWFjZTE=",
+ "artifactURL": "/service-Ccvpnservice-csar.csar",
+ "artifactChecksum": "NTZlNGU4YTQwNzVkZWMwYWZkODE5M2MwYzcyNzM3M2U\u003d",
"artifactDescription": "TOSCA definition package of the asset",
"artifactTimeout": 0,
- "artifactUUID": "771ec21a-1d14-4891-a56f-d4e47e2c8c91",
- "artifactVersion": "2"
+ "artifactVersion": "2",
+ "artifactUUID": "59f34dcf-ec33-4a88-8dbe-aa7f4571ef59"
}
],
"workloadContext": "Production"
diff --git a/asdc-controller/src/test/resources/resource-examples/ccvpn/service-Ccvpnservice-csar.csar b/asdc-controller/src/test/resources/resource-examples/ccvpn/service-Ccvpnservice-csar.csar
new file mode 100644
index 0000000000..ce2ac5e0c9
--- /dev/null
+++ b/asdc-controller/src/test/resources/resource-examples/ccvpn/service-Ccvpnservice-csar.csar
Binary files differ
diff --git a/asdc-controller/src/test/resources/resource-examples/ccvpn/service-Sdwan-csar.csar b/asdc-controller/src/test/resources/resource-examples/ccvpn/service-Sdwan-csar.csar
deleted file mode 100644
index 7a508429f8..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/ccvpn/service-Sdwan-csar.csar
+++ /dev/null
Binary files differ
ight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
{{/*
#  ============LICENSE_START=======================================================
#   Copyright (C) 2021-2022 Nordix Foundation.
#  ================================================================================
#  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: apps/v1
kind: Deployment
metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
  selector: {{- include "common.selectors" . | nindent 4 }}
  replicas: {{ .Values.replicaCount }}
  template:
    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
    spec:
      initContainers:
      - command:
        - /app/ready.py
        args:
        - --job-name
        - {{ include "common.release" . }}-policy-galera-config
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        image: {{ include "repositoryGenerator.image.readiness" . }}
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        name: {{ include "common.name" . }}-readiness
      - command:
        - sh
        args:
        - -c
        - "cd /config-input && for PFILE in `ls -1`; do envsubst <${PFILE} >/config/${PFILE}; done"
        env:
        - name: SQL_USER
          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
        - name: SQL_PASSWORD
          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
        - name: RUNTIME_USER
            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "runtime-secret" "key" "login") | indent 10 }}
        - name: RUNTIME_PASSWORD
          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "runtime-secret" "key" "password") | indent 10 }}
{{- if .Values.config.useStrimziKafka }}
        - name: JAASLOGIN
          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "policy-kafka-user" "key" "sasl.jaas.config") | indent 10 }}
{{- end }}
        volumeMounts:
        - mountPath: /config-input
          name: ac-runtime-config
        - mountPath: /config
          name: ac-runtime-config-processed
        image: {{ include "repositoryGenerator.image.envsubst" . }}
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        name: {{ include "common.name" . }}-update-config
{{ include "common.certInitializer.initContainer" . | indent 6 }}
      containers:
        - name: {{ include "common.name" . }}
          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
{{- if .Values.global.aafEnabled }}
          command: ["sh","-c"]
          args: ["source {{ .Values.certInitializer.credsPath }}/.ci;\
                  /opt/app/policy/clamp/bin/acm-runtime.sh /opt/app/policy/clamp/etc/mounted/acRuntimeParameters.yaml"]
{{- else }}
          command: ["/opt/app/policy/clamp/bin/acm-runtime.sh"]
          args: ["/opt/app/policy/clamp/etc/mounted/acRuntimeParameters.yaml"]
          env:
          - name: KEYSTORE_PASSWD
            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }}
          - name: TRUSTSTORE_PASSWD
            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }}
{{- end }}
          ports: {{ include "common.containerPorts" . | nindent 12  }}
          # disable liveness probe when breakpoints set in debugger
          # so K8s doesn't restart unresponsive container
          {{- if eq .Values.liveness.enabled true }}
          livenessProbe:
            tcpSocket:
              port: {{ .Values.liveness.port }}
            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
            periodSeconds: {{ .Values.liveness.periodSeconds }}
          {{ end -}}
          readinessProbe:
            tcpSocket:
              port: {{ .Values.readiness.port }}
            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
            periodSeconds: {{ .Values.readiness.periodSeconds }}
          volumeMounts:
{{ include "common.certInitializer.volumeMount" . | indent 10 }}
          - mountPath: /etc/localtime
            name: localtime
            readOnly: true
          - mountPath: /opt/app/policy/clamp/etc/mounted
            name: ac-runtime-config-processed
          resources:
{{ include "common.resources" . }}
        {{- if .Values.nodeSelector }}
        nodeSelector:
{{ toYaml .Values.nodeSelector | indent 10 }}
        {{- end -}}
        {{- if .Values.affinity }}
        affinity:
{{ toYaml .Values.affinity | indent 10 }}
        {{- end }}
      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
      volumes:
{{ include "common.certInitializer.volumes" . | indent 8 }}
        - name: localtime
          hostPath:
             path: /etc/localtime
        - name: ac-runtime-config
          configMap:
            name: {{ include "common.fullname" . }}-configmap
            defaultMode: 0755
        - name: ac-runtime-config-processed
          emptyDir:
            medium: Memory
      imagePullSecrets:
      - name: "{{ include "common.namespace" . }}-docker-registry-key"