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

Add support for the spire-controller-manager #71

Closed
wants to merge 1 commit into from

Conversation

developer-guy
Copy link
Contributor

@developer-guy developer-guy commented Nov 10, 2022

@developer-guy
Copy link
Contributor Author

everything seems fine to me, PTAL @marcofranssen

Copy link
Member

@marcofranssen marcofranssen left a 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
Copy link
Member

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"]
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

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?

charts/spire/templates/spire-controller-manager-webhook Outdated Show resolved Hide resolved
@developer-guy
Copy link
Contributor Author

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

totally agree with you! I've updated the helm templates according to your feedback!

Copy link
Member

@marcofranssen marcofranssen left a 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. 🚀

charts/spire/Chart.yaml Outdated Show resolved Hide resolved
charts/spire/values.yaml Outdated Show resolved Hide resolved
charts/spire/values.yaml Outdated Show resolved Hide resolved
@@ -75,7 +75,28 @@ spec:
periodSeconds: 5
resources:
{{- toYaml .Values.server.resources | nindent 12 }}
- name: {{ .Chart.Name }}-workload-registrar
{{- if .Values.controllerManager.enabled }}
Copy link
Member

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.

Copy link
Contributor Author

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

charts/spire/templates/server-statefulset.yaml Outdated Show resolved Hide resolved
@developer-guy developer-guy force-pushed the feature/68 branch 2 times, most recently from 6a22094 to 8ae020a Compare December 15, 2022 09:13
@developer-guy developer-guy requested review from marcofranssen and removed request for marcofranssen December 15, 2022 09:14
- name: {{ printf "%s-%s" $fullname .name }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "spire.serviceAccountName" . }}-agent
Copy link
Member

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?

Copy link
Contributor Author

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

@marcofranssen marcofranssen changed the title replace deprecated k8s-workload-registrar Add support for the spire-controller-manager Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace deprecated workload registrar
2 participants