diff --git a/Jenkinsfile b/Jenkinsfile index f29a09d6b..501746a14 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -178,6 +178,7 @@ pipeline { } agent { label 'nixos-mayastor' } steps { + sh 'printenv' sh './scripts/nix/git-submodule-init.sh --force' sh './scripts/release.sh --skip-publish --debug --build-bins' } diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 536f96a50..53884eb31 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -66,7 +66,7 @@ Usage: {{ include "csi_node_init_containers" . }} */}} {{- define "csi_node_init_containers" -}} - {{- if .Values.csi.node.initContainers.enabled }} + {{- if (.Values.csi.node.initContainers).enabled }} {{- include "render" (dict "value" .Values.csi.node.initContainers.containers "context" $) | nindent 8 }} {{- end }} {{- end -}} @@ -250,4 +250,4 @@ Usage: {{ $param | quote }}: {{ $val | quote }} {{- end -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/chart/templates/mayastor/agents/core/agent-core-deployment.yaml b/chart/templates/mayastor/agents/core/agent-core-deployment.yaml index 92b2bb930..dfa1e2ba5 100644 --- a/chart/templates/mayastor/agents/core/agent-core-deployment.yaml +++ b/chart/templates/mayastor/agents/core/agent-core-deployment.yaml @@ -63,6 +63,9 @@ spec: - "--ansi-colors={{ .Values.base.logging.color }}" - "--create-volume-limit={{ .Values.agents.core.maxCreateVolume }}"{{ if .Values.agents.core.maxRebuilds }} - "--max-rebuilds={{ .Values.agents.core.maxRebuilds }}"{{ end }} + {{- if .Values.agents.core.partialRebuildDisable }} + - "--disable-partial-rebuild" + {{- end }} ports: - containerPort: 50051 env: diff --git a/chart/templates/mayastor/csi/csi-node-daemonset.yaml b/chart/templates/mayastor/csi/csi-node-daemonset.yaml index 74a398eef..681d3b324 100644 --- a/chart/templates/mayastor/csi/csi-node-daemonset.yaml +++ b/chart/templates/mayastor/csi/csi-node-daemonset.yaml @@ -77,7 +77,7 @@ spec: fieldPath: status.podIP - name: RUST_BACKTRACE value: "1" - {{- if .Values.csi.node.mkfs_args.xfs }} + {{- if (.Values.csi.node.mkfs_args).xfs }} - name: MKFS_XFS_ARGS value: {{ .Values.csi.node.mkfs_args.xfs | quote }} {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 375a8d4c3..6d585b9ff 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -179,6 +179,8 @@ agents: # faster depending on the log size. Otherwise, the replica will be fully rebuilt. # A blank value "" means internally derived value will be used. partialRebuildWaitPeriod: "" + # Set to true to disable partial rebuilds. + partialRebuildDisable: # The maximum number of system-wide rebuilds permitted at any given time. # If set to an empty string, there are no limits. maxRebuilds: "" diff --git a/dependencies/control-plane b/dependencies/control-plane index 0058585ee..85562edb5 160000 --- a/dependencies/control-plane +++ b/dependencies/control-plane @@ -1 +1 @@ -Subproject commit 0058585ee0f6b2bca1cab0a9869cc31ca2184f14 +Subproject commit 85562edb5fe4651ff554bc12310b2bffa6541ca4 diff --git a/scripts/helm/publish-chart-yaml.sh b/scripts/helm/publish-chart-yaml.sh index 123b87b14..45be78796 100755 --- a/scripts/helm/publish-chart-yaml.sh +++ b/scripts/helm/publish-chart-yaml.sh @@ -395,8 +395,8 @@ if [ -n "$CHECK_BRANCH" ]; then elif [ -n "$DEVELOP_TO_REL" ]; then if [ "$CHART_VERSION" == "0.0.0" ]; then output_yaml "$APP_TAG" "$APP_TAG" "${CHECK_BRANCH////-}" "Always" - else - die "ERROR: source chart is not from develop branch" + elif [ "$CHART_VERSION" != "$APP_TAG" ]; then + die "ERROR: Already on $CHART_VERSION which does not match $APP_TAG" fi exit 0 fi diff --git a/scripts/helm/test-publish-chart-yaml.sh b/scripts/helm/test-publish-chart-yaml.sh index cc379c8e1..08008d19c 100755 --- a/scripts/helm/test-publish-chart-yaml.sh +++ b/scripts/helm/test-publish-chart-yaml.sh @@ -55,13 +55,21 @@ NEW_CHART_VERSION: $NEW_CHART_VERSION NEW_CHART_APP_VERSION: $NEW_CHART_APP_VERSION EOF elif [ -n "$DEVELOP_TO_REL" ]; then - cat </dev/null 2>&1 @@ -34,7 +34,7 @@ cleanup_and_exit() { local -r status=${1} # Remove helm subcharts, if `helm dependency update` was run. - if [ "$_helm_dependencies_updated" = "true" ]; then + if [ "$HELM_DEPS_UPDATED" = "true" ]; then echo "Cleaning up helm chart dependencies..." for dep_chart in "$CHART_DIR"/charts/*; do if [ "$dep_chart" = "$CHART_DIR/charts/crds" ]; then @@ -99,6 +99,9 @@ DEFAULT_BINARIES="kubectl-plugin" BUILD_BINARIES= BIN_TARGET_PLAT="linux-musl" BINARY_OUT_LINK="." +# This variable will be used to flag if the helm chart dependencies have been +# been updated. +HELM_DEPS_UPDATED="false" # Check if all needed tools are installed curl --version >/dev/null @@ -192,6 +195,8 @@ while [ "$#" -gt 0 ]; do esac done +trap 'cleanup_and_exit "$?"' EXIT + cd $SCRIPTDIR/.. if [ -z "$IMAGES" ]; then @@ -243,9 +248,6 @@ if [ -n "$BUILD_BINARIES" ]; then done fi -# This variable will be used to flag if the helm chart dependencies have been -# been updated. -_helm_dependencies_updated="false" for name in $IMAGES; do image_basename=$($NIX_EVAL -f . images.$BUILD_TYPE.$name.imageName | xargs) image=$image_basename @@ -257,7 +259,7 @@ for name in $IMAGES; do fi fi - if [ "$_helm_dependencies_updated" = "false" ]; then + if [ "$HELM_DEPS_UPDATED" = "false" ]; then for helm_chart_user in ${IMAGES_THAT_REQUIRE_HELM_CHART[@]}; do if [ "$name" = "$helm_chart_user" ]; then echo "Updating helm chart dependencies..." @@ -276,7 +278,7 @@ for name in $IMAGES; do done # Set flag to true - _helm_dependencies_updated="true" + HELM_DEPS_UPDATED="true" break fi done