Skip to content
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

Set additionalSecretOutputs on Secret data fields #1194

Merged
merged 1 commit into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fix error parsing Helm version (https://github.com/pulumi/pulumi-kubernetes/pull/1170)
- Fix prometheus-operator test to wait for the CRD to be ready before use (https://github.com/pulumi/pulumi-kubernetes/pull/1172)
- Fix suppress deprecation warnings flag (https://github.com/pulumi/pulumi-kubernetes/pull/1189)
- Set additionalSecretOutputs on Secret data fields (https://github.com/pulumi/pulumi-kubernetes/pull/1194)

### Improvements

Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/pkg/errors v0.9.1
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200701201749-137f39151bb5
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200702193010-d611740ab0fa
github.com/pulumi/pulumi/sdk/v2 v2.5.1-0.20200626210151-8961f5b0caae
github.com/stretchr/testify v1.6.1
google.golang.org/grpc v1.28.0
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,8 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200701201749-137f39151bb5 h1:eZwzn4BxGoWANUNzCp0nsLA80GSdljNdDTrMkfE/6mY=
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200701201749-137f39151bb5/go.mod h1:zfUm4/GH2dVRlHZ3Yeb9bRweCQM7icVBdplu6MUDRrQ=
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200702193010-d611740ab0fa h1:iqnQ3kfZbK+KUXw+fqquS51xSjkJjh83u/COzQXGjjw=
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200702193010-d611740ab0fa/go.mod h1:zfUm4/GH2dVRlHZ3Yeb9bRweCQM7icVBdplu6MUDRrQ=
github.com/pulumi/pulumi/sdk/v2 v2.0.0/go.mod h1:W7k1UDYerc5o97mHnlHHp5iQZKEby+oQrQefWt+2RF4=
github.com/pulumi/pulumi/sdk/v2 v2.5.1-0.20200626210151-8961f5b0caae h1:KuvWPTsPuiRTnYIShcjzoksbF8XQPAxnxa89m9+Lqj0=
github.com/pulumi/pulumi/sdk/v2 v2.5.1-0.20200626210151-8961f5b0caae/go.mod h1:llk6tmXss8kJrt3vEXAkwiwgZOuINEFmKIfMveVIwO8=
Expand Down
5 changes: 5 additions & 0 deletions sdk/dotnet/Core/V1/Secret.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
AdditionalSecretOutputs =
{
"data",
"stringData",
},
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
Expand Down
5 changes: 5 additions & 0 deletions sdk/go/kubernetes/core/v1/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ func NewSecret(ctx *pulumi.Context,
}
args.ApiVersion = pulumi.StringPtr("v1")
args.Kind = pulumi.StringPtr("Secret")
secrets := pulumi.AdditionalSecretOutputs([]string{
"data",
"stringData",
})
opts = append(opts, secrets)
var resource Secret
err := ctx.RegisterResource("kubernetes:core/v1:Secret", name, args, &resource, opts...)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions sdk/nodejs/core/v1/Secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export class Secret extends pulumi.CustomResource {
if (!opts.version) {
opts.version = utilities.getVersion();
}
const secretOpts = { additionalSecretOutputs: ["data", "stringData"] };
opts = opts ? pulumi.mergeOptions(opts, secretOpts) : secretOpts;
super(Secret.__pulumiType, name, inputs, opts);
}
}
Expand Down
2 changes: 2 additions & 0 deletions sdk/python/pulumi_kubernetes/core/v1/Secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def __init__(__self__, resource_name, opts=None, api_version=None, data=None, im
__props__['metadata'] = metadata
__props__['string_data'] = string_data
__props__['type'] = type
secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["data", "stringData"])
opts = pulumi.ResourceOptions.merge(opts, secret_opts)
super(Secret, __self__).__init__(
'kubernetes:core/v1:Secret',
resource_name,
Expand Down
2 changes: 1 addition & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ replace (
require (
github.com/pulumi/pulumi-kubernetes/provider/v2 v2.0.0-00010101000000-000000000000
github.com/pulumi/pulumi-kubernetes/sdk/v2 v2.0.0
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200701201749-137f39151bb5
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200702193010-d611740ab0fa
github.com/pulumi/pulumi/sdk/v2 v2.5.1-0.20200626210151-8961f5b0caae
github.com/stretchr/testify v1.6.1
)
4 changes: 2 additions & 2 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200701201749-137f39151bb5 h1:eZwzn4BxGoWANUNzCp0nsLA80GSdljNdDTrMkfE/6mY=
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200701201749-137f39151bb5/go.mod h1:zfUm4/GH2dVRlHZ3Yeb9bRweCQM7icVBdplu6MUDRrQ=
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200702193010-d611740ab0fa h1:iqnQ3kfZbK+KUXw+fqquS51xSjkJjh83u/COzQXGjjw=
github.com/pulumi/pulumi/pkg/v2 v2.5.1-0.20200702193010-d611740ab0fa/go.mod h1:zfUm4/GH2dVRlHZ3Yeb9bRweCQM7icVBdplu6MUDRrQ=
github.com/pulumi/pulumi/sdk/v2 v2.0.0 h1:3VMXbEo3bqeaU+YDt8ufVBLD0WhLYE3tG3t/nIZ3Iac=
github.com/pulumi/pulumi/sdk/v2 v2.0.0/go.mod h1:W7k1UDYerc5o97mHnlHHp5iQZKEby+oQrQefWt+2RF4=
github.com/pulumi/pulumi/sdk/v2 v2.2.2-0.20200514204320-e677c7d6dca3 h1:uCVadlcmLexcm6WHJv1EFB3E9PKqWQt/+zVuNC+WpjM=
Expand Down