Skip to content

Commit de4aba1

Browse files
committed
Initial commit
1 parent 09ee66c commit de4aba1

File tree

17 files changed

+855
-59
lines changed

17 files changed

+855
-59
lines changed

.github/settings.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# Upstream changes from _extends are only recognized when modifications are made to this file in the default branch.
22
_extends: .github
33
repository:
4-
name: template
5-
description: Template for Terraform Components
4+
name: aws-eks-external-secrets-operator
5+
description: This component (ESO) is used to create an external `SecretStore` configured to synchronize secrets from AWS SSM Parameter store as Kubernetes Secrets within the cluster
66
homepage: https://cloudposse.com/accelerate
77
topics: terraform, terraform-component
8-
9-
10-
11-

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Components PR [[eks/external-secrets-operator] Set default chart](https://github.com/cloudposse/terraform-aws-components/pull/856)
2+
3+
This is a bug fix and feature enhancement update. No actions necessary to upgrade.
4+
5+
## Fixes
6+
7+
- Set default chart

README.yaml

Lines changed: 209 additions & 48 deletions
Large diffs are not rendered by default.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
locals {
2+
# If you have custom policy statements, override this declaration by creating
3+
# a file called `additional-iam-policy-statements_override.tf`.
4+
# Then add the custom policy statements to the overridable_additional_iam_policy_statements in that file.
5+
overridable_additional_iam_policy_statements = [
6+
# {
7+
# sid = "UseKMS"
8+
# effect = "Allow"
9+
# actions = [
10+
# "kms:Decrypt"
11+
# ]
12+
# resources = [
13+
# "*"
14+
# ]
15+
# }
16+
]
17+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v2
2+
name: external-ssm-secrets
3+
description: This Chart handles deploying custom resource definitions needed to access SSM via external-secrets-operator
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 0.1.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: "0.1.0"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: external-secrets.io/v1beta1
2+
kind: ClusterSecretStore
3+
metadata:
4+
name: "secret-store-parameter-store"
5+
spec:
6+
provider:
7+
aws:
8+
service: ParameterStore
9+
region: {{ .Values.region }}
10+
role: {{ .Values.role }} # role is created via helm-release; see `service_account_set_key_path`

src/examples/app-secrets.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# example to fetch all secrets underneath the `/app/` prefix (service).
2+
# Keys are rewritten within the K8S Secret to be predictable and omit the
3+
# prefix.
4+
5+
apiVersion: external-secrets.io/v1beta1
6+
kind: ExternalSecret
7+
metadata:
8+
name: app-secrets
9+
spec:
10+
refreshInterval: 30s
11+
secretStoreRef:
12+
name: "secret-store-parameter-store" # Must match name of the Cluster Secret Store created by this component
13+
kind: ClusterSecretStore
14+
target:
15+
creationPolicy: Owner
16+
name: app-secrets
17+
dataFrom:
18+
- find:
19+
name:
20+
regexp: "^/app/" # Match the path prefix of your service
21+
rewrite:
22+
- regexp:
23+
source: "/app/(.*)" # Remove the path prefix of your service from the name before creating the envars
24+
target: "$1"

src/examples/external-secrets.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# example to fetch a single secret from our Parameter Store `SecretStore`
2+
3+
apiVersion: external-secrets.io/v1beta1
4+
kind: ExternalSecret
5+
metadata:
6+
name: single-secret
7+
spec:
8+
refreshInterval: 30s
9+
secretStoreRef:
10+
name: "secret-store-parameter-store" # Must match name of the Cluster Secret Store created by this component
11+
kind: ClusterSecretStore
12+
target:
13+
creationPolicy: Owner
14+
name: single-secret
15+
data:
16+
- secretKey: good_secret
17+
remoteRef:
18+
key: /app/good_secret

src/helm-variables.tf

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
variable "kubernetes_namespace" {
2+
type = string
3+
description = "The namespace to install the release into."
4+
}
5+
6+
variable "chart_description" {
7+
type = string
8+
description = "Set release description attribute (visible in the history)."
9+
default = "External Secrets Operator is a Kubernetes operator that integrates external secret management systems including AWS SSM, Parameter Store, Hasicorp Vault, 1Password Secrets Automation, etc. It reads values from external vaults and injects values as a Kubernetes Secret"
10+
}
11+
12+
variable "chart_repository" {
13+
type = string
14+
description = "Repository URL where to locate the requested chart."
15+
default = "https://charts.external-secrets.io"
16+
}
17+
18+
variable "chart" {
19+
type = string
20+
description = "Chart name to be installed. The chart name can be local path, a URL to a chart, or the name of the chart if `repository` is specified. It is also possible to use the `<repository>/<chart>` format here if you are running Terraform on a system that the repository has been added to with `helm repo add` but this is not recommended."
21+
default = "external-secrets"
22+
}
23+
24+
variable "chart_version" {
25+
type = string
26+
description = "Specify the exact chart version to install. If this is not specified, the latest version is installed."
27+
default = "0.6.0-rc1"
28+
# using RC to address this bug https://github.com/external-secrets/external-secrets/issues/1511
29+
}
30+
31+
variable "chart_values" {
32+
type = any
33+
description = "Additional values to yamlencode as `helm_release` values."
34+
default = {}
35+
}
36+
37+
variable "create_namespace" {
38+
type = bool
39+
description = "Create the Kubernetes namespace if it does not yet exist"
40+
default = null
41+
}
42+
43+
variable "verify" {
44+
type = bool
45+
description = "Verify the package before installing it. Helm uses a provenance file to verify the integrity of the chart; this must be hosted alongside the chart"
46+
default = false
47+
}
48+
49+
variable "wait" {
50+
type = bool
51+
description = "Will wait until all resources are in a ready state before marking the release as successful. It will wait for as long as `timeout`. Defaults to `true`."
52+
default = true
53+
}
54+
55+
variable "atomic" {
56+
type = bool
57+
description = "If set, installation process purges chart on fail. The wait flag will be set automatically if atomic is used."
58+
default = true
59+
}
60+
61+
variable "cleanup_on_fail" {
62+
type = bool
63+
description = "Allow deletion of new resources created in this upgrade when upgrade fails."
64+
default = true
65+
}
66+
67+
variable "timeout" {
68+
type = number
69+
description = "Time in seconds to wait for any individual kubernetes operation (like Jobs for hooks). Defaults to `300` seconds"
70+
default = null
71+
}

0 commit comments

Comments
 (0)