-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ServiceAccount update panic (#3169)
The `ServiceAccount` awaiter is the only one which uses `clusterVersion` to decide its behavior, and we were only populating this on creation. #3139 consolidated create/update wait logic, which introduced a panic in this case because we're now calling the init awaiter during update. This PR adds a `nil` check to be safe and also populates `clusterVersion` for update/delete/read in the off chance that another awaiter might want to use it later down the line. Fixes #3166
- Loading branch information
Showing
6 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: await-service-account | ||
runtime: yaml | ||
description: Test await logic with service accounts. | ||
|
||
resources: | ||
ns: | ||
type: kubernetes:core/v1:Namespace | ||
|
||
provider: | ||
type: pulumi:providers:kubernetes | ||
properties: | ||
namespace: ${ns.metadata.name} | ||
|
||
service-account: | ||
type: kubernetes:core/v1:ServiceAccount | ||
options: | ||
provider: ${provider} |
22 changes: 22 additions & 0 deletions
22
tests/sdk/java/testdata/await/service-account/step2/Pulumi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: await-service-account | ||
runtime: yaml | ||
description: Test await logic with service accounts. | ||
|
||
resources: | ||
ns: | ||
type: kubernetes:core/v1:Namespace | ||
|
||
provider: | ||
type: pulumi:providers:kubernetes | ||
properties: | ||
namespace: ${ns.metadata.name} | ||
|
||
service-account: | ||
type: kubernetes:core/v1:ServiceAccount | ||
properties: | ||
# Update the service account's metadata. | ||
metadata: | ||
annotations: | ||
foo: bar | ||
options: | ||
provider: ${provider} |