-
Notifications
You must be signed in to change notification settings - Fork 35
add refresh_before field to ske_kubeconfig resource #1000
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 refresh_before field to ske_kubeconfig resource #1000
Conversation
Can you give me some general feedback whether this feature is desirable, and if you are happy with the naming of the new field? |
Hi @maxbischoff, the feature looks like a nice improvement to me from a first glance. Some remarks before starting with the in-depth review: Maybe you can adjust the example to show off your new feature: terraform-provider-stackit/examples/resources/stackit_ske_kubeconfig/resource.tf Lines 1 to 5 in 813b8c0
Please also adjust the "Max" acceptance test to include your new field: terraform-provider-stackit/stackit/internal/services/ske/ske_acc_test.go Lines 295 to 299 in 813b8c0
|
c0552d3
to
cd877d7
Compare
Thanks for the quick feedback @rubenhoenle , I added it to the example and the acceptance test. |
@maxbischoff Sadly the acc tests are failing, see below
How to fix?I guess you will have to add your new attribute here: terraform-provider-stackit/stackit/internal/services/ske/testdata/resource-max.tf Lines 96 to 101 in f0438e8
And don't forget do add a new variable for it: terraform-provider-stackit/stackit/internal/services/ske/testdata/resource-max.tf Lines 33 to 34 in f0438e8
Some background info why I'm asking you to do this: The
|
Please also check the failing CI pipeline @maxbischoff |
cd877d7
to
80e60d1
Compare
Sorry about the Acceptance Tests, I though I ran them locally, but there was a |
No worries, it's not intended that you have to run them (at least for such a small change). I will re-run them tomorrow, they run for some time 😄 |
Acc tests look good now 😊
|
Co-authored-by: Marcel Jacek <[email protected]>
60b6d0c
to
48e1ccb
Compare
Description
We want to manage our kubeconfigs with terraform and then use them for deploying resources to kubernetes.
Since we don't constantly re-apply the terraform-module creating the kubeconfig, we often run into situations where the kubeconfig has expired, causing failures in our deployment, but the last terraform apply hasn't refreshed the config yet.
With this feature we can ensure that a new kubeconfig will be created before the old one expires.
Checklist
make fmt
examples/
directory)make generate-docs
(will be checked by CI)make test
(will be checked by CI)make lint
(will be checked by CI)