Add GRPC + Rest endpoint to retreive VM Config, Inject and Inherit Secrets and Configmaps to environment config #204
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Retreives the current VM Configuration for a given VM via a gRPC endpoint.
Needed by controllers, currently the terraform controller calculates the config themselves
VM Controller injects secret in fields where the value is
inject_secret:<name>:<field>
The same is applied for configmaps:
inject_configmap:<name>:<field>
This ensures that no secrets are stored directly inside the environment enabling us to store environments inside a git repository.
Also whole secrets and configmap data can be inherited by using
inherit_secrets
as the key and a comma sepperated list with secret metadata.namesSame applies to
inherit_configmaps
for configmapsExample
inherit_secrets = secret1,secret2
will inherit data fromsecret1
andsecret2
. So ifsecret1
has a fieldtoken
with the valueabc
it will be added to the configAlso adds a REST endpoint in order to retreive VM configuration inside the admin ui in order to debug VMs
Before this PR the controller itself retreives the environment and checks if the given VMT is enabled on the environment.
This PR moves this behaviour to the VM creation, so that controllers do not have to check if this is a valid configuration.
Which issue(s) this PR fixes: