Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm: Add namespace to all resource templates #13288

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

travisn
Copy link
Member

@travisn travisn commented Nov 28, 2023

The helm templates assumed that the resources would be installed to the given namespace for the helm install or upgrade. This works perfectly until there is a desire to extract the manifests from the helm chart and instead install with those. Thus, the namespace is added to all the resources in the chart where they were missing.

Which issue is resolved by this Pull Request:
Resolves #13268

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@foyerunix
Copy link

Hello,

This PR fix my issue for the chart https://github.com/rook/rook/tree/master/deploy/charts/rook-ceph.
I didn't found any missing namespace in https://github.com/rook/rook/tree/master/deploy/charts/library.

Meanwhile for https://github.com/rook/rook/tree/master/deploy/charts/rook-ceph-cluster:

While I don't use theses resources they all appear to be namespaced in my cluster:

kubectl api-resources | grep -E 'NAME|ceph'

NAME                               SHORTNAMES                          APIVERSION                             NAMESPACED   KIND
cephblockpoolradosnamespaces                                           ceph.rook.io/v1                        true         CephBlockPoolRadosNamespace
cephblockpools                                                         ceph.rook.io/v1                        true         CephBlockPool
cephbucketnotifications                                                ceph.rook.io/v1                        true         CephBucketNotification
cephbuckettopics                                                       ceph.rook.io/v1                        true         CephBucketTopic
cephclients                                                            ceph.rook.io/v1                        true         CephClient
cephclusters                                                           ceph.rook.io/v1                        true         CephCluster
cephcosidrivers                    cephcosi                            ceph.rook.io/v1                        true         CephCOSIDriver
cephfilesystemmirrors                                                  ceph.rook.io/v1                        true         CephFilesystemMirror
cephfilesystems                                                        ceph.rook.io/v1                        true         CephFilesystem
cephfilesystemsubvolumegroups                                          ceph.rook.io/v1                        true         CephFilesystemSubVolumeGroup
cephnfses                          nfs                                 ceph.rook.io/v1                        true         CephNFS
cephobjectrealms                                                       ceph.rook.io/v1                        true         CephObjectRealm
cephobjectstores                                                       ceph.rook.io/v1                        true         CephObjectStore
cephobjectstoreusers               rcou,objectuser                     ceph.rook.io/v1                        true         CephObjectStoreUser
cephobjectzonegroups                                                   ceph.rook.io/v1                        true         CephObjectZoneGroup
cephobjectzones                                                        ceph.rook.io/v1                        true         CephObjectZone
cephrbdmirrors                                                         ceph.rook.io/v1                        true         CephRBDMirror

The helm templates assumed that the resources would be installed
to the given namespace for the helm install or upgrade. This works
perfectly until there is a desire to extract the manifests from
the helm chart and instead install with those. Thus, the namespace
is added to all the resources in the chart where they were
missing.

Signed-off-by: travisn <tnielsen@redhat.com>
@travisn
Copy link
Member Author

travisn commented Nov 29, 2023

Ok, I've also update the namespace in the cluster chart now for completeness, even if they were not affecting you.

Instances for some of the CRDs you mention are not created by the helm charts, only the core CRs are created in the cluster chart.

@travisn travisn merged commit 09844e8 into rook:master Nov 30, 2023
51 checks passed
mergify bot added a commit that referenced this pull request Nov 30, 2023
helm: Add namespace to all resource templates (backport #13288)
@travisn travisn deleted the helm-operator-ns branch December 13, 2023 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helm: missing namespace in operator deployment and operator configmap templates
3 participants