-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add support for the spire-controller-manager #71
Conversation
3d59407
to
0f84633
Compare
4118a92
to
e7331de
Compare
everything seems fine to me, PTAL @marcofranssen |
charts/spire/crds/spire.spiffe.io_clusterfederatedtrustdomains.yaml
Outdated
Show resolved
Hide resolved
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.
Gave some inline feedback, but also have a general request which I also didn't clearly put in the issue.
Can we do the following
k8sregistrar:
enabled: false
spire-controller-manager:
enabled: true
So we can first have a couple of releases where people can still fall back on the old stuff.
I also think we might want to have a dedicated file, service-account for the spire-controller-manager to have it as a separate deployment with its own rbac.
In general first rebase on main, so you have a few new Values like the socketPath to be reused
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.8.0 |
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 this be configurable? What and where is this version coming from? Could people use another version?
@@ -11,12 +11,32 @@ rules: | |||
resources: ["tokenreviews"] | |||
verbs: ["get", "create"] | |||
- apiGroups: [""] | |||
resources: ["pods", "nodes"] | |||
resources: ["pods", "nodes", "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.
Why does the server now need namespace access?
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.
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.
Isn't that only for the controller manager?
e7331de
to
64c0b98
Compare
totally agree with you! I've updated the helm templates according to your feedback! |
64c0b98
to
68d74ac
Compare
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.
Few remarks and suggestions.
You are getting close. 🚀
@@ -75,7 +75,28 @@ spec: | |||
periodSeconds: 5 | |||
resources: | |||
{{- toYaml .Values.server.resources | nindent 12 }} | |||
- name: {{ .Chart.Name }}-workload-registrar | |||
{{- if .Values.controllerManager.enabled }} |
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.
Can we isolate this into a separate Deployment
/file? I assume it doesn't need persistence from code below. In case it needs persistence, please make it a StatefulSet
.
Probably also include the wait-for-it initContainer to ensure spire server is up and running when launching the controller manager.
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.
I've created another deployment file for spire-controller-manager
6a22094
to
8ae020a
Compare
- name: {{ printf "%s-%s" $fullname .name }} | ||
{{- end }} | ||
{{- end }} | ||
serviceAccountName: {{ include "spire.serviceAccountName" . }}-agent |
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 we create a dedicated service account and RBAC?
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.
I'm not sure about that. It seems that it can cause duplicate the same CR/CRBs for the server for the controller manager too 🤔 Because I really don't know what are the exact permissions we need to have for controller manager
charts/spire/templates/spire-controller-manager-deployment.yaml
Outdated
Show resolved
Hide resolved
a9f362a
to
19a960a
Compare
69ffd43
to
cf68694
Compare
Signed-off-by: Batuhan Apaydın <[email protected]>
cf68694
to
84d3233
Compare
Signed-off-by: Batuhan Apaydın [email protected]
Fixes #68
/cc @marcofranssen