Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

WIP: Server config via values + plugin config #49

Closed
wants to merge 13 commits into from

Conversation

kfox1111
Copy link
Contributor

@kfox1111 kfox1111 commented Feb 25, 2023

This patch enables all of the server settings to be configured via values along with adding any plugin you want via values.

Everything is managed via yaml templating and is converted to json to be passed to spire in the end.

Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
…ged with values.

Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
…e/helm-charts into json-server-config-plugins

Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
@kfox1111
Copy link
Contributor Author

Rebased.

@kfox1111 kfox1111 changed the title WIP: Json server config plugins WIP: Server config via values + plugin config Mar 1, 2023
@kfox1111 kfox1111 mentioned this pull request Mar 1, 2023
@marcofranssen marcofranssen added this to the Nested spire support milestone Mar 2, 2023
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Copy link
Contributor

@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.

Couple of small questions/suggestions? By moving those macros to helpers, I hope it becomes easier to see the diff on the configmap itself. It might make sense to split the configmap from the plugins part to have a smaller PR.

charts/spire/charts/spire-server/values.yaml Outdated Show resolved Hide resolved
}
}
{{- end }}
{{- define "spire-server.config-plugins-template" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we define these functions in _helpers?

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 debated that. If I did, none of the config would be in the configmap template anymore. Which may be confusing to some reviewers? But I'm good either way honestly. _helpers.tpl would be good. or I could do a _configmap.tpl ?

port = 9988
}
}
{{- define "spire-server.config-main-template" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we define these functions in helpers?

country: NL
organization: Example
common_name: example.org
config:
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to introduce this config level?

In the end everything we define here is config…

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Its working because it can toYaml all of .config. if we did all of the stuff at root, .Values, there would be a bunch of junk that leaks through.

Copy link
Contributor Author

@kfox1111 kfox1111 Mar 2, 2023

Choose a reason for hiding this comment

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

For clarification, It allows any setting in the server block to be configured. So it solves overriding more then just the predefined stuff. We could template it all back out, but would loose the ability to set arbitrary settings within the server block.

Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
@kfox1111
Copy link
Contributor Author

kfox1111 commented Mar 3, 2023

Was asked to move this here for now:
kfox1111#1

Lets please move the discussion there.

@kfox1111 kfox1111 closed this Mar 3, 2023
@kfox1111 kfox1111 deleted the json-server-config-plugins branch August 17, 2023 19:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants