-
Notifications
You must be signed in to change notification settings - Fork 12
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
New Feature: Use KubeDownscaler Without Cluster Wide Access (Namespaced Access) #73
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…space-only-access # Conflicts: # chart/templates/rbac.yaml
… api calls. rbac refactored to only include namespaced resources
…straintedDownscaler value is set to true
…ate --exclude-namespaces
…ould contain more than 1 element, refactored helm chart
samuel-esp
requested review from
Fovty,
jonathan-mayer and
JTaeuber
as code owners
July 20, 2024 09:36
JTaeuber
approved these changes
Jul 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
JTaeuber
pushed a commit
that referenced
this pull request
Jul 22, 2024
…ed Access) (#73) * facilitates backward compatibility * docs refactoring * refactored chart to include constrainted-namespace installation * refactored chart to include constrainted-namespace installation * added constrainted downscaler arg inside code * refactor --namespace argument to be able to handle a list of strings * refactore autoscale_jobs function * --namespace object could be only be used with constrainted_downscaler api calls. rbac refactored to only include namespaced resources * fixed constraintedNamesapce test namespaces inside values.yaml * added try-except to better log RBAC errors * helm chart will automaticall add --constrainted-downscaler arg if constraintedDownscaler value is set to true * added tests * added log to inform user that using --namespace argument will deactivate --exclude-namespaces * added error handling inside scaler.py * refactored namespace argument to namespaces to clarify the variable could contain more than 1 element, refactored helm chart * refactored docs * refactored migrate from codeberg docs section * removed --constrainted-downscaler argument to better help user configurations * refactored docs * refactored docs * refactored docs and constrained variable name * refactored docs * added release namespace inside helm chart (deplyoment, configmap and serviceaccount) * refactored variable names inside helm chart * refactored variable names inside docs * improved 403 error handling, changed log.error to log.warning
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This Pull Request will enable users use KubeDownscaler Without Cluster Wide Access (Namespaced Access).
Changes
Python Code:
--namespace
argument will now accept a list of stringconstrianed_downscaler
variable that will be automatically set to true if--namespace
arg is specified--namespace
and--exclude-namespaces
are now mutually exclusive,--namespace
will take precedence and override--exclude-namespaces
.--namespace
and--admission-controller
are now mutually exclusive, the user will still be able to downscale jobs natively as specified inside pull request Scale Jobs Natively (Without Admission Controllers) #71--namespace
arg is specified, the Kubernetes API Server will receive different API Calls that don't target Cluster Wide operationsDocs:
Helm Chart
constrainedDownscaler
,constrainedNamespaces
). The first one is boolean value and the second one is a list of namespaces where the KubeDownscaler can operateconstrainedDownscaler
withoutconstrainedNamespaces
Constrained Mode
{{ .Release.Namespace }}
to Deployment, ConfigMap and ServiceAccount, in order to help the user to configure a differrent namespace for installationTests done
TODO