- Notifications
You must be signed in to change notification settings - Fork7
feat: add multi-namespace support#124
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
helm/templates/service.yaml Outdated
@@ -1,5 +1,5 @@ | |||
apiVersion:rbac.authorization.k8s.io/v1 | |||
kind:Role | |||
kind:ClusterRole |
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.
If namespaces are specified, this should probably be a for loop to create the role and role binding in each namespace, rather than granting full cluster permissions
You should probably make the permissions block a reusable template though
helm/templates/service.yaml Outdated
-name:CODER_NAMESPACES | ||
value:{{if .Values.namespaces }}{{ join "," .Values.namespaces }}{{ else }}{{ end }} |
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.
-name:CODER_NAMESPACES | |
value:{{ if .Values.namespaces }}{{ join "," .Values.namespaces }}{{ else }}{{ end }} | |
{{ if .Values.namespaces -}} | |
-name:CODER_NAMESPACES | |
value:"{{ join"," .Values.namespaces }}" | |
{{ end -}} |
// init starts the informer factory and registers event handlers. | ||
func (p*podEventLogger)init()error { | ||
func (p*podEventLogger)initNamespace(namespacestring)error { |
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.
Should include a sentence in the method comment explaining thenamespace
parameter
namespace:"" | ||
# namespace --List of namespacestosearch for Pods within. | ||
# If unspecified or empty it will watch all namespaces. | ||
namespaces:[] |
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.
This is breaking so make sure you inform customers in the release notes.
bca9af2
intomainUh oh!
There was an error while loading.Please reload this page.
Description
This PR adds multi-namespace support to coder-logstream-kube, allowing users to monitor pod events across multiple namespaces or all namespaces in a cluster. This replaces the previous single-namespace limitation.
Closes#5
Changes
--namespaces
flag orCODER_NAMESPACES
environment variableKubernetes RBAC Updates
Configuration Changes
values.yaml
to usenamespaces
array instead of singlenamespace
stringCODER_NAMESPACE
toCODER_NAMESPACES
(comma-separated)--namespace
flag to--namespaces
with comma-separated supportExample
Breaking Changes
CODER_NAMESPACE
is replaced withCODER_NAMESPACES
--namespace
is replaced with--namespaces
namespace
string is replaced withnamespaces
array