cloudposse-archives / reference-architectures

[WIP] Get up and running quickly with one of our reference architecture using our fully automated cold-start process.
https://cloudposse.com/accelerate
Apache License 2.0
154 stars 33 forks source link

Adds featureGates to already templated services #48

Closed asiegman closed 4 years ago

asiegman commented 5 years ago

what

Of note, I did not add support for scheduler or controller manager since you're currently not deviating from defaults there. I could add those if you'd like.

Also of note: I don't do error checking on input formatting here, as I felt it would overly complicate the template. I'm also not sure the best way to do that, so there's also that. Things will fail if the environment variables are not set as feature1="false",feature2="true" and so on.

why

example parsing

$ gomplate -f /localhost/work/cloudposse/reference-architectures/templates/kops/kops-private-topology.yaml.gotmpl | grep -C5 feature
# no output, note added for clarity
$ export KOPS_KUBE_API_SERVER_FEATURE_GATES="ExpandInUsePersistentVolumes=true,SomeOtherFeature=false"
$ gomplate -f /localhost/work/cloudposse/reference-architectures/templates/kops/kops-private-topology.yaml.gotmpl | grep -C5 feature
      type: Public
      idleTimeoutSeconds: 600
  kubeAPIServer:
    anonymousAuth: false
    authorizationMode: RBAC
    featureGates:
      ExpandInUsePersistentVolumes: true
      SomeOtherFeature: false
    admissionControl:
    - NamespaceLifecycle
    - LimitRanger

references

asiegman commented 5 years ago

Refactored the variables I use and how they are applied. Now a single variable. Will make it easier if we want to add the other sections feature gates can apply to.

maximmi commented 4 years ago

@Nuru could you please check and approve?

osterman commented 4 years ago

We're going to deprecate this version of the reference architecture in favor of a simpler one.