-
Notifications
You must be signed in to change notification settings - Fork 69
Conversation
2f06dbc
to
3cd6a7b
Compare
How to test: Create a secret called
Apply the following (or a similar) workspace
Wait for a few minutes while the operator works its magic, and run
Once you see the
|
Example output when upgrading: Up until the previous version, once the workspace was done applying we could get the outputs from a config map:
Once we install the latest version:
|
I started testing this today. It looks like there is a regression in the CRD:
I'm working around it by setting the API version to |
Nice, it's working! I had to grab the latest commit in your test repo (which btw, thanks for adding that!). Now my test app is up-to-date enough for the secrets to work:
Next I'll just give the code a quick read-through. |
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.
Thanks for adding this feature! This looks great. The only issue I ran into was with the CRD, and maybe running go mod tidy
to clean up go.mod, but other than that, everything is working well.
the workspace's outputs, and it will keep updating only those for | ||
subsequent runs. Old ConfigMaps will be left for the users to delete | ||
when they are ready. | ||
|
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.
Nice upgrade notes! I like that users can take this at their own pace, rather than having the ConfigMap automatically deleted.
go.mod
Outdated
@@ -11,7 +11,7 @@ require ( | |||
github.com/pkg/sftp v1.12.0 // indirect | |||
github.com/spf13/pflag v1.0.5 | |||
github.com/stretchr/testify v1.6.1 | |||
github.com/zclconf/go-cty v1.5.1 | |||
github.com/zclconf/go-cty v1.5.1 // indirect |
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.
It looks like we need to run go mod tidy
since the modules were in a bit of an inconsistent state when I looked at them locally. When I ran it, it cleaned up some things.
During review of #80 it was discovered that v1beta1 of the CRD schema was not compatible with setting default values, like we do for the workspace's default version. Since setting the CRD schema version to v1 instead would result in dropping support for k8s versions before 1.16.0 we'll allow the schema to support empty terraform versions and handle the lack of a value in the code.
Currently the operator stores outputs as configmaps. This can be undesirable for some environments since output values can be considered sensitive. This change creates k8s secrets instead of ConfigMaps to satisfy this usecase.
Co-authored-by: Stef Forrester <dak1n1@users.noreply.github.com>
During review of #80 it was discovered that v1beta1 of the CRD schema was not compatible with setting default values, like we do for the workspace's default version. Since setting the CRD schema version to v1 instead would result in dropping support for k8s versions before 1.16.0 we'll allow the schema to support empty terraform versions and handle the lack of a value in the code.
1e3b0df
to
335e791
Compare
Rebased against master. |
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.
Nice fix! It's all working as expected 😄
Yes I believe it does. |
Currently the operator stores outputs as configmaps. This can be
undesirable for some environments since output values can be considered
sensitive. This change creates k8s secrets instead of ConfigMaps to
satisfy this use case.