Skip to content

Conversation

@MikeSpreitzer
Copy link
Contributor

@MikeSpreitzer MikeSpreitzer commented Dec 15, 2025

Summary

This PR updates the namespace template in the Helm chart to properly handle a second helm upgrade, following an outline from @francostellari. This PR also makes the E2E test case for this executable and adds it to the set of test cases that actually run. This PR also fixes the waits and the display of Pods in that test case.

Related issue(s)

Fixes #453

@kubestellar-prow kubestellar-prow bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 15, 2025
@MikeSpreitzer MikeSpreitzer force-pushed the more-conditional-namespace branch from 1286b4d to 5ca0c46 Compare December 15, 2025 22:35

# Wait for deployment rollout to complete and all pods to be ready
echo "9. Waiting for deployment rollout to complete..."
if ! kubectl rollout status deployment/kubeflex-controller-manager -n kubeflex-system --timeout=300s; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same wait as is done in step 6; no need to repeat it.

@MikeSpreitzer MikeSpreitzer force-pushed the more-conditional-namespace branch from 0768486 to 87b25a0 Compare December 16, 2025 00:10
@kubestellar-prow kubestellar-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 16, 2025
@MikeSpreitzer
Copy link
Contributor Author

/cc @francostellari
/cc @pdettori

@MikeSpreitzer
Copy link
Contributor Author

@Rupam-It
@RayyanSeliya
/cc @rxinui

@kubestellar-prow kubestellar-prow bot requested a review from rxinui December 16, 2025 00:11
@MikeSpreitzer MikeSpreitzer force-pushed the more-conditional-namespace branch from 87b25a0 to e2bbabb Compare December 16, 2025 00:15
@kubestellar-prow kubestellar-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 16, 2025
@MikeSpreitzer
Copy link
Contributor Author

@katara-Jayprakash

{{ template "NS" -}}
{{ end -}}
{{ end -}}
{{ else -}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using a with/else/end statement?
I was not aware that it was supported
Something does not seem to make sense to me

Copy link
Contributor Author

@MikeSpreitzer MikeSpreitzer Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is one of the forms defined in https://pkg.go.dev/text/[email protected]#hdr-Actions .

The thing that that doc does not quite say clearly enough for my taste is that the value of an assignment is the value on the RHS of the assignment. But I do think that this is true, and is why the initial helm upgrade --install creates the namespace.

@MikeSpreitzer
Copy link
Contributor Author

/cc @francostellari

@francostellari
Copy link
Contributor

I tested these 4 configurations and they seem to work as expected:

1:

helm upgrade --install kubeflex-operator kubeflex-ks/chart/ \
--set domain=localtest.me \
--set externalPort=9443

2

kubectl create ns kubeflex-system

helm upgrade --install kubeflex-operator kubeflex-ks/chart/ \
--set domain=localtest.me \
--set externalPort=9443

3

kubectl create ns kubeflex-system

helm upgrade --install kubeflex-operator kubeflex-ks/chart/ \
--namespace kubeflex-system \
--set domain=localtest.me \
--set externalPort=9443

4

helm upgrade --install kubeflex-operator kubeflex-ks/chart/ \
--namespace kubeflex-system --create-namespace \
--set domain=localtest.me \
--set externalPort=9443

@francostellari
Copy link
Contributor

however, for completeness, if an upgrade command specifies a different namespace of the previous helm command it will fail

helm upgrade --install kubeflex-operator kubeflex-ks/chart/ \
--namespace kubeflex-system --create-namespace \
--set domain=localtest.me \
--set externalPort=9443

then

helm upgrade --install kubeflex-operator kubeflex-ks/chart/ \
--set domain=localtest.me \
--set externalPort=9443

fails:

Error: Unable to continue with install: ServiceAccount "kubeflex-controller-manager" in namespace "kubeflex-system" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-namespace" must equal "default": current value is "kubeflex-system"

I'm not sure how this could be fixed at the moment and it's probably outside of this scope.

@francostellari
Copy link
Contributor

/lgtm

@kubestellar-prow kubestellar-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jan 7, 2026
@kubestellar-prow
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 370c9b0587a9956dcbf8f2b72e4513d5bf1269e7

@katara-Jayprakash
Copy link
Contributor

however, for completeness, if an upgrade command specifies a different namespace of the previous helm command it will fail

helm upgrade --install kubeflex-operator kubeflex-ks/chart/ \
--namespace kubeflex-system --create-namespace \
--set domain=localtest.me \
--set externalPort=9443

then

helm upgrade --install kubeflex-operator kubeflex-ks/chart/ \
--set domain=localtest.me \
--set externalPort=9443

fails:

Error: Unable to continue with install: ServiceAccount "kubeflex-controller-manager" in namespace "kubeflex-system" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-namespace" must equal "default": current value is "kubeflex-system"

I'm not sure how this could be fixed at the moment and it's probably outside of this scope.

@MikeSpreitzer with these review I think we can move forward to the next steps

@MikeSpreitzer
Copy link
Contributor Author

I think that #592 (comment) is outside the usage envelope that we intend to support.

@MikeSpreitzer
Copy link
Contributor Author

/approve

@kubestellar-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MikeSpreitzer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 7, 2026
@kubestellar-prow kubestellar-prow bot merged commit befdef7 into kubestellar:main Jan 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Controller manager pod not restarting after make install-local-chart

3 participants