Skip to content

Commit d14f0cd

Browse files
committed
Update config for secrets
1 parent 897e478 commit d14f0cd

File tree

6 files changed

+34
-3
lines changed

6 files changed

+34
-3
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
registry-server: ghcr.io
1919
registry-username: ${{ github.actor }}
2020
image: ${{ github.repository }}
21-
version: 0.1.0
21+
version: 0.1.1
2222
secrets:
2323
pull-request-token: ${{ secrets.GH_ORG_PAT }}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,13 @@ The Workspace Provisioner package has the following configurable properties.
109109
| `namespaces` | `[]` | Configuration for the namespaces the platform will provision and manage. |
110110
| `service_account` | `default` | The `ServiceAccount` to be configured with credentials and roles in each workspace. |
111111
| `oci_registry.secret.name` | `""` | The name of the Secret holding the credentials to access the OCI registry. **Required**. |
112+
| `oci_registry.secret.namespace` | `""` | The namespace of the Secret holding the credentials to access the OCI registry. **Required**. |
112113
| `cosign.secret.name` | `""` | The name of the Secret holding the Cosign key pair. |
113114
| `cosign.secret.namespace` | `""` | The namespace of the Secret holding the Cosign key pair. |
114115
| `git.server` | `https://github.com` | The Git server hosting the Git repositories used in the GitOps workflows. |
115116
| `git.credentials.username` | `""` | The username to access the Git repositories. |
116117
| `git.credesntials.password` | `""` | The password to access the Git repositories. |
117-
| `git.secret.name` | `""` | The name of the Secret holding the Git credentials. |
118+
| `git.secret.name` | `supply-chain-git-credentials` | The name of the Secret holding the Git credentials. |
118119

119120
</details>
120121

package/config/setup-namespaces.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,31 @@
88
#@ return data.values.git.server != "" and data.values.git.credentials.username != "" and data.values.git.credentials.password != ""
99
#@ end
1010

11+
#! SECRET EXPORTS
12+
13+
---
14+
apiVersion: secretgen.carvel.dev/v1alpha1
15+
kind: SecretExport
16+
metadata:
17+
name: #@ data.values.oci_registry.secret.name
18+
namespace: #@ data.values.oci_registry.secret.namespace
19+
spec:
20+
toNamespaces:
21+
- "*"
22+
23+
#@ if/end is_cosign_secret_available():
24+
---
25+
apiVersion: secretgen.carvel.dev/v1alpha1
26+
kind: SecretExport
27+
metadata:
28+
name: #@ data.values.cosign.secret.name
29+
namespace: #@ data.values.cosign.secret.namespace
30+
spec:
31+
toNamespaces:
32+
- "*"
33+
34+
#! NAMESPACES
35+
1136
#@ for namespace in data.values.namespaces:
1237

1338
---

package/config/values-schema.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ oci_registry:
1616
#@schema/desc "The name of the Secret holding the credentials to access the OCI registry."
1717
#@schema/validation min_len=1
1818
name: ""
19+
#@schema/desc "The namespace of the Secret holding the credentials to access the OCI registry."
20+
#@schema/validation min_len=1
21+
namespace: ""
1922

2023
#@schema/desc "Settings for Cosign, used for signing and verifying OCI artifacts."
2124
cosign:
@@ -40,4 +43,4 @@ git:
4043
secret:
4144
#@schema/desc "The name of the Secret holding the Git credentials."
4245
#@schema/validation when=lambda _, ctx: ctx.root["git"]["credentials"]["username"] != "" and ctx.root["git"]["credentials"]["password"] != ""
43-
name: ""
46+
name: supply-chain-git-credentials

test/integration/default/config/values.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ stringData:
1111
oci_registry:
1212
secret:
1313
name: supply-chain-registry-credentials
14+
namespace: kadras-packages

test/unit/config/values.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
oci_registry:
33
secret:
44
name: supply-chain-registry-credentials
5+
namespace: kadras-packages

0 commit comments

Comments
 (0)