Commit 9b31bef0 authored by Laura Dominguez's avatar Laura Dominguez
Browse files

Make NBI CCIPS certificate mount conditional on CCIPS deployment

parent 64954168
Loading
Loading
Loading
Loading
+7 −0
Changes for deploy/tfs.sh: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -131,6 +131,13 @@ bash scripts/dockerhub_k8s_secret.sh "$TFS_K8S_NAMESPACE"
sleep 2
printf "\n"

if [[ "${COMPONENT}" == "nbi" ]] && \
   [[ " ${TFS_COMPONENTS} " == *" ccips "* ]]; then

    cp manifests/nbiservice_ccips.yaml \
       ${TMP_MANIFESTS_FOLDER}/nbiservice_ccips.yaml
fi

if [[ " ${TFS_COMPONENTS} " == *" ccips "* ]]; then
    for CERT_FILE in CA.crt tfs-agent1.crt tfs-agent1.key tfs-agent2.crt tfs-agent2.key; do
        if [[ ! -r "${CCIPS_CERTS_DIR}/${CERT_FILE}" ]]; then
+0 −11
Changes for manifests/nbiservice.yaml: 0 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -44,15 +44,9 @@ spec:
              value: "production"  # normal value is "production", change to "development" if developing
            - name: IETF_NETWORK_RENDERER
              value: "LIBYANG"
            - name: CCIPS_CERTS_DIR
              value: "/etc/ccips/certs"
          envFrom:
            - secretRef:
                name: kfk-kpi-data
          volumeMounts:
            - name: pqc-certs
              mountPath: /etc/ccips/certs
              readOnly: true
          readinessProbe:
            httpGet:
              path: /healthz
@@ -74,11 +68,6 @@ spec:
            limits:
              cpu: 1000m
              memory: 2048Mi
      volumes:
        - name: pqc-certs
          secret:
            secretName: ccips-pqc-certs
            defaultMode: 0400
      # Volume mounts for TE data with IS-IS, BW and latency. Uncomment if needed
      #     volumeMounts:
      #       - name: te-data
+35 −0
Changes for manifests/nbiservice_ccips.yaml: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Copyright 2022-2026 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# 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.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nbiservice
spec:
  template:
    spec:
      containers:
        - name: server
          env:
            - name: CCIPS_CERTS_DIR
              value: /etc/ccips/certs
          volumeMounts:
            - name: pqc-certs
              mountPath: /etc/ccips/certs
              readOnly: true
      volumes:
        - name: pqc-certs
          secret:
            secretName: ccips-pqc-certs
            defaultMode: 0400
 No newline at end of file