Avoid copy of encryption-provider from drbd location

As we are using secure luks file system which is replicated
as well between controllers. We don't need to copy it from
drbd config location in controllerconfig service.

This change avoids copy of encryption-provider.yaml from
'/opt/platform/config/<version>/kubernetes' to
'/etc/kubernetes'. This fixes the issue observed during
platform upgrade.

Test Plan:
PASS: build-pkgs -c -p controllerconfig
PASS: build-image
PASS: SX upgrade: system should be upgraded to the latest version
      without any issues.

Story: 2010873
Task: 49376

Change-Id: Id0656df6878eed0bd7df2c1e9d5739cf2d536aa2
Signed-off-by: Jagatguru Prasad Mishra <jagatguruprasad.mishra@windriver.com>
This commit is contained in:
Jagatguru Prasad Mishra 2024-02-05 04:47:13 -05:00
parent d989d98bc3
commit cec7b02961
1 changed files with 11 additions and 8 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2013-2023 Wind River Systems, Inc.
# Copyright (c) 2013-2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -487,13 +487,16 @@ start()
FILES=`ls $CONFIG_DIR/kubernetes/*.yaml`
for FILE in $FILES
do
cp -P $FILE /etc/kubernetes/
if [ $? -ne 0 ]
then
fatal_error "Unable to copy kube-apiserver config file: $FILE"
else
FILENAME=`basename $FILE`
chmod 600 /etc/kubernetes/$FILENAME
# Exclude encryption-provider.yaml
if [ "$FILE" != "$CONFIG_DIR/kubernetes/encryption-provider.yaml" ]; then
cp -P $FILE /etc/kubernetes/
if [ $? -ne 0 ]
then
fatal_error "Unable to copy kube-apiserver config file: $FILE"
else
FILENAME=`basename $FILE`
chmod 600 /etc/kubernetes/$FILENAME
fi
fi
done
fi