Skip to content

Commit 45316fd

Browse files
authored
changed proposed items (#16380)
* changed proposed items * updated comments * changes as per review comments * fixed review comments * apply grammar fixes * added an article
1 parent a8612ca commit 45316fd

File tree

1 file changed

+20
-15
lines changed
  • content/tutorials/esc-external-secret-operator

1 file changed

+20
-15
lines changed

content/tutorials/esc-external-secret-operator/index.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,40 +39,44 @@ prereqs:
3939
#### Install from Helm Chart Repository
4040

4141
```bash
42+
# add ESO Operator Chart repo into helm
4243
helm repo add external-secrets https://charts.external-secrets.io
4344
helm repo update
4445

46+
# installs latest ESO Operator Chart, creates also namespace
4547
helm upgrade --install external-secrets external-secrets/external-secrets \
46-
--namespace external-secrets \
47-
--create-namespace \
48-
--wait
48+
--namespace external-secrets \
49+
--create-namespace \
50+
--wait
4951
```
5052

5153
#### Create secret containing Pulumi access token
5254

5355
```bash
56+
# create a local k8s secret to store(PAT), to allow accessing Pulumi Cloud Resources
5457
kubectl create secret generic pulumi-access-token --from-literal=PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN} \
5558
--namespace external-secrets
5659
```
5760

5861
#### Create ClusterSecretStore
5962

60-
Now you can create a [ClusterSecretStore](https://external-secrets.io/main/api/clustersecretstore/) resource that will tell External Secrets Operator to use Pulumi ESC as a secret provider.
63+
You can create a [SecretStore](https://external-secrets.io/main/api/secretstore/) resource to notify the External Secrets Operator to use Pulumi ESC as a secret provider for a specific namespace.
6164

62-
If you want to limit the access by namespace, you can create a [SecretStore](https://external-secrets.io/main/api/secretstore/) resource instead, which is scoped to a single namespace.
65+
However, if you want to expand the scope to an entire cluster you can use a [ClusterSecretStore](https://external-secrets.io/main/api/clustersecretstore/) resource instead.
6366

6467
```yaml
6568
cat <<EOF | kubectl apply -f -
66-
apiVersion: external-secrets.io/v1beta1
67-
kind: ClusterSecretStore
69+
apiVersion: external-secrets.io/v1
70+
kind: SecretStore
6871
metadata:
6972
name: secret-store
73+
namespace: external-secrets
7074
spec:
7175
provider:
7276
pulumi:
73-
organization: ${PULUMI_ORG}
74-
project: ${ESC_PROJECT}
75-
environment: ${ESC_ENV}
77+
organization: {PULUMI_ORG_NAME}
78+
project: {ESC_PROJECT_NAME}
79+
environment: {ESC_ENV_NAME}
7680
accessToken:
7781
secretRef:
7882
name: pulumi-access-token
@@ -81,9 +85,9 @@ spec:
8185
EOF
8286
```
8387

84-
Please replace `${PULUMI_ORG}`, `${ESC_PROJECT}`, `${ESC_ENV}` with your Pulumi organization, project, and environment names.
88+
Please replace `${PULUMI_ORG_NAME}`, `${ESC_PROJECT_NAME}`, `${ESC_ENV_NAME}` with your Pulumi organization, project, and environment names.
8589

86-
For demo purposes, we assume that we already have an [ESC environment](/docs/esc/get-started/create-environment/) `my-org/my-project/my-env` with a secret `my-secret` that we want to manage using External Secrets Operator.
90+
For demo purposes, we assume that we already have an [ESC environment](/docs/esc/get-started/create-environment/) `my-org/my-project/my-env` with a secret `my-secret` that we want to manage using the External Secrets Operator.
8791

8892
```yaml
8993
values:
@@ -96,18 +100,19 @@ Now you can create an [ExternalSecret](https://external-secrets.io/main/api/exte
96100
97101
```yaml
98102
cat <<EOF | kubectl apply -f -
99-
apiVersion: external-secrets.io/v1beta1
103+
apiVersion: external-secrets.io/v1
100104
kind: ExternalSecret
101105
metadata:
102106
name: secret
107+
namespace: external-secrets
103108
spec:
104109
data:
105110
- secretKey: esc-secret
106111
remoteRef:
107112
key: hello
108113
refreshInterval: 20s
109114
secretStoreRef:
110-
kind: ClusterSecretStore
115+
kind: SecretStore
111116
name: secret-store
112117
EOF
113118
```
@@ -119,7 +124,7 @@ There a many other options available for [ExternalSecret](https://external-secre
119124
With the following command, you can verify that the secret has been created in the cluster:
120125

121126
```bash
122-
kubectl get secret secret -o jsonpath='{.data.esc-secret}' | base64 -d
127+
kubectl get secret secret --namespace external-secrets -o jsonpath='{.data.esc-secret}' | base64 -d
123128
# Output:
124129
world
125130
```

0 commit comments

Comments
 (0)