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

Make environment variable population more generic #125

Merged
merged 7 commits into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from 6 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
4 changes: 2 additions & 2 deletions .github/workflows/push_and_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.16.2'
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.16.2'
- name: Install Ginkgo testing framework
run: go install github.com/onsi/ginkgo/ginkgo
- name: Setup gcloud CLI for GKE testing cluster
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.16.2'
- name: Install Ginkgo testing framework
run: go install github.com/onsi/ginkgo/ginkgo
- name: Setup gcloud CLI for GKE testing cluster
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.14.6'
go-version: '1.16.2'
- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login docker.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ CHANGELOG
- Fix integration tests. Bumps embedded pulumi to 2.17.0.
[#115](https://github.com/pulumi/pulumi-kubernetes-operator/pull/115)

- Make environment variable population more generic and bump base image to 2.23.1
[#125](https://github.com/pulumi/pulumi-kubernetes-operator/pull/125)

## 0.0.8 (2020-12-03)

- Use ephemeral storage for disk mutations.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM pulumi/pulumi:v2.17.0
FROM pulumi/pulumi:v2.23.1

ENV OPERATOR=/usr/local/bin/pulumi-kubernetes-operator

Expand Down
61 changes: 58 additions & 3 deletions deploy/crds/pulumi.com_stacks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
description: StackSpec defines the desired state of Pulumi Stack being managed by this operator.
properties:
accessTokenSecret:
description: (optional) AccessTokenSecret is the name of a secret containing the PULUMI_ACCESS_TOKEN for Pulumi access.
description: '(optional) AccessTokenSecret is the name of a secret containing the PULUMI_ACCESS_TOKEN for Pulumi access. Deprecated: use SecretEnvsFromPath with PULUMI_ACCESS_TOKEN as key or SecretEnvs with a secret entry key PULUMI_ACCESS_KEY instead.'
type: string
backend:
description: '(optional) Backend is an optional backend URL to use for all Pulumi operations. Examples: - Pulumi Service: "https://app.pulumi.com" (default) - Self-managed Pulumi Service: "https://pulumi.acmecorp.com" - Local: "file://./einstein" - AWS: "s3://<my-pulumi-state-bucket>" - Azure: "azblob://<my-pulumi-state-bucket>" - GCP: "gs://<my-pulumi-state-bucket>" See: https://www.pulumi.com/docs/intro/concepts/state/'
Expand All @@ -52,13 +52,68 @@ spec:
destroyOnFinalize:
description: (optional) DestroyOnFinalize can be set to true to destroy the stack completely upon deletion of the CRD.
type: boolean
envRefs:
additionalProperties:
description: ResourceRef identifies a resource from which information can be loaded.
properties:
env:
description: EnvSelector identifies the environment variable to load information from.
properties:
name:
description: Name of the environment variable
type: string
required:
- name
type: object
filesystem:
description: FSSelector identifies the path to load information from.
properties:
path:
description: Path on the filesystem to use to load information from.
type: string
required:
- path
type: object
literal:
description: LiteralRef identifies a literal value to load.
properties:
value:
description: Value to load
type: string
required:
- value
type: object
secret:
description: SecretSelector identifies the information to load from a Kubernetes secret.
properties:
key:
description: Key within the secret to use.
type: string
name:
description: Name of the secret
type: string
namespace:
description: Namespace where the secret is stored. Defaults to 'default' if omitted.
type: string
required:
- key
- name
type: object
type:
description: 'SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal'
type: string
required:
- type
type: object
description: (optional) EnvRefs is an optional map containing environment variables as keys and stores descriptors to where the variables' values should be loaded from (one of literal, environment variable, file on the filesystem, or Kubernetes secret) as values.
type: object
envSecrets:
description: (optional) SecretEnvs is an optional array of secret names containing environment variables to set.
description: '(optional) SecretEnvs is an optional array of secret names containing environment variables to set. Deprecated: use EnvRefs instead.'
items:
type: string
type: array
envs:
description: (optional) Envs is an optional array of config maps containing environment variables to set.
description: '(optional) Envs is an optional array of config maps containing environment variables to set. Deprecated: use EnvRefs instead.'
items:
type: string
type: array
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pulumi/pulumi-kubernetes-operator

go 1.13
go 1.16

require (
github.com/go-logr/logr v0.1.0
Expand All @@ -9,17 +9,17 @@ require (
github.com/operator-framework/operator-lib v0.0.0-20200728190837-b76db547798d
github.com/operator-framework/operator-sdk v0.19.0
github.com/pkg/errors v0.9.1
github.com/pulumi/pulumi/sdk/v2 v2.17.1-0.20210112212813-6a9d5c982242
github.com/pulumi/pulumi/sdk/v2 v2.23.1
github.com/spf13/pflag v1.0.5
github.com/whilp/git-urls v1.0.0
golang.org/x/mod v0.3.0 // indirect
golang.org/x/tools v0.0.0-20200617161249-6222995d070a // indirect
gopkg.in/src-d/go-git.v4 v4.13.1
k8s.io/api v0.18.4
k8s.io/apiextensions-apiserver v0.18.4
k8s.io/apimachinery v0.18.4
k8s.io/client-go v12.0.0+incompatible
sigs.k8s.io/controller-runtime v0.6.1
sigs.k8s.io/controller-tools v0.3.0 // indirect
)

replace (
Expand Down
Loading