Skip to content

[Helm] Unify role bindings - #4262

Merged
charith-elastic merged 2 commits into
elastic:masterfrom
charith-elastic:fix/helm-role-binding
Feb 23, 2021
Merged

[Helm] Unify role bindings#4262
charith-elastic merged 2 commits into
elastic:masterfrom
charith-elastic:fix/helm-role-binding

Conversation

@charith-elastic

Copy link
Copy Markdown
Contributor

I discovered a bug that I could swear I fixed a couple of months ago (a missing role binding if the operator namespace is included in the managed namespaces list) 🤷🏼

This PR fixes the bug and also combines the role bindings into a single template. Having them spread over two files made it too difficult to reason about.

@charith-elastic charith-elastic added >bug Something isn't working >refactoring labels Feb 19, 2021
name: "{{ $fullName }}"
namespace: {{ $namespace }}
labels:
{{- include "eck-operator.labels" $ | nindent 4 }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think the Selector labels include is missing a - as it produces a leading empty line.

@@ -0,0 +1,80 @@
{{- $operatorNSIsManaged := has .Release.Namespace .Values.managedNamespaces -}}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

bit odd that the file is called role-bindings.yaml but it also contains roles

@charith-elastic
charith-elastic merged commit 67e7699 into elastic:master Feb 23, 2021
@charith-elastic
charith-elastic deleted the fix/helm-role-binding branch February 23, 2021 11:44
charith-elastic added a commit to charith-elastic/cloud-on-k8s that referenced this pull request Feb 24, 2021
* [Helm] Unify role bindings

* Fix space in labels
charith-elastic added a commit that referenced this pull request Mar 1, 2021
* [Helm] Unify role bindings

* Fix space in labels
@pebrc pebrc removed the >refactoring label Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug Something isn't working v1.4.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants