Skip to content

Commit e54dabf

Browse files
committed
chore(workflow): add acme config
1 parent e375f00 commit e54dabf

7 files changed

Lines changed: 50 additions & 16 deletions

File tree

_scripts/install.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,12 @@ additionalArguments:
196196
- "--entrypoints.name.http3"
197197
- "--providers.kubernetesingress.allowEmptyServices=true"
198198
EOF
199-
helm install cert-manager drycc/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true --wait
199+
helm install cert-manager drycc/cert-manager \
200+
--namespace cert-manager \
201+
--create-namespace \
202+
--set clusterResourceNamespace=drycc \
203+
--set installCRDs=true --wait
204+
200205
helm install catalog drycc/catalog \
201206
--set asyncBindingOperationsEnabled=true \
202207
--set image=docker.io/drycc/service-catalog:canary \
@@ -305,6 +310,9 @@ EOF
305310
--set database.persistence.enabled=true \
306311
--set database.persistence.size=${DATABASE_PERSISTENCE_SIZE:-5Gi} \
307312
--set database.persistence.storageClass=${DATABASE_PERSISTENCE_STORAGE_CLASS:-""} \
313+
--set acme.server=${ACME_SERVER:-"https://acme-v02.api.letsencrypt.org/directory"} \
314+
--set acme.externalAccountBinding.keyID=${ACME_EAB_KEY_ID:-""} \
315+
--set acme.externalAccountBinding.keySecret=${ACME_EAB_KEY_SECRET:-""} \
308316
--namespace drycc \
309317
--values /tmp/drycc-values.yaml \
310318
--create-namespace --wait --timeout 30m0s
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{- if and (not (empty .Values.acme.externalAccountBinding.keyID)) (not (empty .Values.acme.externalAccountBinding.keySecret)) }}
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: drycc-cluster-issuer-secret
6+
labels:
7+
heritage: drycc
8+
type: Opaque
9+
data:
10+
secret: {{.Values.acme.externalAccountBinding.keySecret | b64enc }}
11+
{{- end }}

charts/workflow/templates/drycc-cluster-issuer.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ metadata:
44
name: drycc-cluster-issuer
55
spec:
66
acme:
7-
# The ACME server URL
8-
server: https://acme-v02.api.letsencrypt.org/directory
97
# Email address used for ACME registration
108
email: "{{ .Values.global.email }}"
9+
# The ACME server URL
10+
server: "{{ .Values.acme.server }}"
11+
{{ if and (not (empty .Values.acme.externalAccountBinding.keyID)) (not (empty .Values.acme.externalAccountBinding.keySecret)) }}
12+
externalAccountBinding:
13+
keyID: {{ .Values.acme.externalAccountBinding.keyID }}
14+
keySecretRef:
15+
name: drycc-cluster-issuer-secret
16+
key: secret
17+
{{ end }}
1118
# Name of a secret used to store the ACME account private key
1219
privateKeySecretRef:
1320
name: drycc-cluster-issuer

charts/workflow/templates/objectstorage-secret.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ data:
4141
accesskey: {{ .Values.minio.accesskey | b64enc }}
4242
secretkey: {{ .Values.minio.secretkey | b64enc }}
4343
builder-bucket: {{ .Values.minio.builderBucket | b64enc }}
44-
registry-bucket: {{.Values.minio.registryBucket | b64enc }}
45-
database-bucket: {{.Values.minio.databaseBucket | b64enc }}
44+
registry-bucket: {{ .Values.minio.registryBucket | b64enc }}
45+
database-bucket: {{ .Values.minio.databaseBucket | b64enc }}
4646
{{ end }}

charts/workflow/values.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
global:
44
# Admin email, used for each component to send email to administrator
55
email: "drycc@drycc.cc"
6-
# Whether to use the template defined by common
7-
common: true
86
# Set the storage backend
97
#
108
# Valid values are:
@@ -81,7 +79,7 @@ global:
8179
#
8280
# This will be the hostname that is used to build endpoints such as "drycc.$HOSTNAME"
8381
platformDomain: ""
84-
# Whether cert_manager is enabled to automatically generate drycc certificates
82+
# Whether certManagerEnabled is true to automatically generate drycc certificates
8583
certManagerEnabled: true
8684
# Set the location of Workflow's passport
8785
#
@@ -168,13 +166,6 @@ builder:
168166
# If service.type is not set to NodePort, the following statement will be ignored.
169167
nodePort: ""
170168

171-
#
172-
passport:
173-
# Set passport deployment replicas
174-
replicas: 1
175-
# Configuring this will no longer use the built-in database component
176-
databaseUrl: ""
177-
178169
controller:
179170
appImagePullPolicy: "IfNotPresent"
180171
# Possible values are:
@@ -308,3 +299,17 @@ registry:
308299
organization: ""
309300
username: ""
310301
password: ""
302+
303+
passport:
304+
# Set passport deployment replicas
305+
replicas: 1
306+
# Configuring this will no longer use the built-in database component
307+
databaseUrl: ""
308+
309+
# acme configuration takes effect if and only if certManagerEnabled is true
310+
acme:
311+
server: https://acme-v02.api.letsencrypt.org/directory
312+
# EAB credentials
313+
externalAccountBinding:
314+
keyID: ""
315+
keySecret: ""

src/installing-workflow/system-requirements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Drycc Workflow requires Kubernetes v1.16.15 or later.
1111
Drycc uses ingress as a routing implementation, so you have to choose an ingress.
1212
We recommend using [nginx-ingress](https://github.com/helm/charts/tree/master/stable/nginx-ingress) or [traefik-ingress](https://github.com/helm/charts/tree/master/stable/traefik), which we have adapted to allowlist and force TLS functions.
1313

14-
Workflow supports the use of ACME to manage automatic certificates, [cert-manager](https://github.com/helm/charts/tree/master/stable/cert-manager) is also one of the necessary components.
14+
Workflow supports the use of ACME to manage automatic certificates, [cert-manager](https://github.com/helm/charts/tree/master/stable/cert-manager) is also one of the necessary components, if you use cert-manager EAB, you need to set the `clusterResourceNamespace` to the namespace of drycc.
1515

1616
Workflow supports stateful apps. You can create and use them through the 'drycc volumes' command. If you want to use this feature, you must have a `StorageClass` that supports `ReadWriteMany`.
1717

src/quickstart/install-workflow.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ HELMBROKER_PERSISTENCE_STORAGE_CLASS | StorangeClass of `helmbroker`; defa
198198
K3S_DATA_DIR | The config of k3s data dir; If not set, the default path is used
199199
DEFAULT_STORAGE_CLASS | K3s default stroageclass, If not set, the `openebs-hostpath` stroageclass is used
200200
LOCAL_PROVISIONER_PATH | Local path storage path, If not set, the `/var/openebs/local` path is used
201+
ACME_SERVER | ACME Server url, default use letsencrypt
202+
ACME_EAB_KEY_ID | The key ID of which your external account binding is indexed by the external account
203+
ACME_EAB_KEY_SECRET | The key Secret of which your external account symmetric MAC key
201204

202205
Since the installation script will install k3s, other environment variables can refer to k3s installation [environment variables](https://rancher.com/docs/k3s/latest/en/installation/install-options/).
203206

0 commit comments

Comments
 (0)