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

chore: change the comment for defaultNamespace in values.yaml #9793

Merged
merged 4 commits into from
Aug 6, 2024

Conversation

salonig23
Copy link
Contributor

@salonig23 salonig23 commented Aug 3, 2024

Ticket

Description

stop supporting resource_manager.namespace and use release namespace as default instead of "default" in helm deployements.

Test Plan

no testing required

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@cla-bot cla-bot bot added the cla-signed label Aug 3, 2024
Copy link

netlify bot commented Aug 3, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit e14a0d0
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66b27e8e72c62e0008bdfda0

@salonig23 salonig23 added the to-cherry-pick Pull requests that need to be cherry-picked into the current release label Aug 3, 2024
@salonig23 salonig23 marked this pull request as ready for review August 3, 2024 00:47
Copy link

codecov bot commented Aug 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.05%. Comparing base (786f258) to head (e14a0d0).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9793      +/-   ##
==========================================
- Coverage   54.07%   54.05%   -0.03%     
==========================================
  Files        1260     1260              
  Lines      155574   155565       -9     
  Branches     3503     3504       +1     
==========================================
- Hits        84120    84083      -37     
- Misses      71308    71336      +28     
  Partials      146      146              
Flag Coverage Δ
backend 44.90% <ø> (-0.07%) ⬇️
harness 72.62% <ø> (ø)
web 53.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
master/internal/config/resource_manager_config.go 67.21% <ø> (-0.23%) ⬇️
...nal/rm/kubernetesrm/kubernetes_resource_manager.go 27.89% <ø> (+0.16%) ⬆️

... and 6 files with indirect coverage changes

Copy link
Contributor

@amandavialva01 amandavialva01 left a comment

Choose a reason for hiding this comment

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

Minor change to the comment requested, but since this PR is currently a 1 word change for the defaultNamespace comment, I took a look at how defaultNamespace gets set in master-config.yaml, and we should probably add a coalesce as follows.

{{- if $defaultNamespace := coalesce .Values.resourceManager.defaultNamespace .Release.namespace }}
     default_namespace: {{ quote $defaultNamespace }}
 {{- end }}

This way, the default namespace that users previously had set for their k8s clusters gets preserved. Can we make that change here since it's on the topic of the same field whose comment is being modified?

@salonig23 salonig23 requested a review from hkumar92 August 5, 2024 16:47
@amandavialva01
Copy link
Contributor

amandavialva01 commented Aug 5, 2024

Minor change to the comment requested, but since this PR is currently a 1 word change for the defaultNamespace comment, I took a look at how defaultNamespace gets set in master-config.yaml, and we should probably add a coalesce as follows.

{{- if $defaultNamespace := coalesce .Values.resourceManager.defaultNamespace .Release.namespace }}
     default_namespace: {{ quote $defaultNamespace }}
 {{- end }}

This way, the default namespace that users previously had set for their k8s clusters gets preserved. Can we make that change here since it's on the topic of the same field whose comment is being modified?

cc @hkumar92 do we want this change?
Currently (without this change) when users helm upgrade with our newest helm chart, workspace<>namespace mappings indirectly created (with wksp<>rp , rp<>namespace mappings) will be "lost" since we now ignore the rp<>ns mappings. So unless the user updates their values.yaml to specify a resourceManager.defaultNamespace upon helm upgrade, their workspaces would all be bound to the default namespace which is mentioned in our documents.
However, we may not want this "default" namespace binding since previously, the namespace field of the helm chart was set to the release namespace, .Release.Namespace. Hence the change suggested here.
WDYT? Should we leave things as is and where an upgrade binds workspaces to the default namespace, or do we want previous (indirectly configured) workspace-namespace bindings to be carried over provided the user doesn't directly specify a default_namespace in values.yaml?

@hkumar92
Copy link
Contributor

hkumar92 commented Aug 5, 2024

Minor change to the comment requested, but since this PR is currently a 1 word change for the defaultNamespace comment, I took a look at how defaultNamespace gets set in master-config.yaml, and we should probably add a coalesce as follows.

{{- if $defaultNamespace := coalesce .Values.resourceManager.defaultNamespace .Release.namespace }}
     default_namespace: {{ quote $defaultNamespace }}
 {{- end }}

This way, the default namespace that users previously had set for their k8s clusters gets preserved. Can we make that change here since it's on the topic of the same field whose comment is being modified?

cc @hkumar92 do we want this change? Currently (without this change) when users helm upgrade with our newest helm chart, workspace<>namespace mappings indirectly created (with wksp<>rp , rp<>namespace mappings) will be "lost" since we now ignore the rp<>ns mappings. So unless the user updates their values.yaml to specify a resourceManager.defaultNamespace upon helm upgrade, their workspaces would all be bound to the default namespace which is mentioned in our documents. However, we may not want this "default" namespace binding since previously, the namespace field of the helm chart was set to the release namespace, .Release.Namespace. Hence the change suggested here. WDYT? Should we leave things as is and where an upgrade binds workspaces to the default namespace, or do we want previous (indirectly configured) workspace-namespace bindings to be carried over provided the user doesn't directly specify a default_namespace in values.yaml?

I think it makes sense for us to default to the releaseNamespace if the user doesn't define anything instead of binding to default

@salonig23 salonig23 requested review from a team as code owners August 5, 2024 20:55
@determined-ci determined-ci requested a review from a team August 5, 2024 20:55
@determined-ci determined-ci added the documentation Improvements or additions to documentation label Aug 5, 2024
@@ -23,7 +23,8 @@ bindings and resource quotas using either the WebUI or the CLI.
specify a namespace in the namespace field, the workspace is bound to that namespace. If the
field is left blank, the workspace is bound to the namespace specified in the
``resource_manager.default_namespace`` section of your master configuration (when set), and is
otherwise bound to the default Kubernetes "default" namespace.
otherwise bound to the release namespace. We fall back to the default Kubernetes namespace,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
otherwise bound to the release namespace. We fall back to the default Kubernetes namespace,
otherwise bound to the release namespace. For non-helm Determined deployments, it falls back to the default Kubernetes namespace, ``default``.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed!

Copy link
Contributor

@tara-det-ai tara-det-ai left a comment

Choose a reason for hiding this comment

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

suggested edit

@salonig23 salonig23 requested review from kkunapuli and removed request for NicholasBlaskey August 6, 2024 17:15
Copy link
Contributor

@kkunapuli kkunapuli left a comment

Choose a reason for hiding this comment

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

LGTM. I know this is "chore" but it's also potentially user facing; do you think we need a release note?

@salonig23
Copy link
Contributor Author

LGTM. I know this is "chore" but it's also potentially user facing; do you think we need a release note?

I had added release notes directly to the release notes PR!

@determined-ci determined-ci requested a review from a team August 6, 2024 18:09
@salonig23 salonig23 merged commit 4e47a1e into main Aug 6, 2024
115 of 122 checks passed
@salonig23 salonig23 deleted the fix-namespace-comment branch August 6, 2024 20:59
github-actions bot pushed a commit that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed documentation Improvements or additions to documentation to-cherry-pick Pull requests that need to be cherry-picked into the current release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants