Skip to content

[kots]: make the self-hosted cert more explicitly selectable #8633

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

Merged
merged 1 commit into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions install/kots/manifests/gitpod-certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ kind: Certificate
metadata:
name: https-certificates
annotations:
kots.io/when: '{{repl ConfigOptionEquals "cert_manager_enabled" "1" }}'
kots.io/when: '{{repl or (ConfigOptionEquals "tls_self_signed_enabled" "1") (ConfigOptionEquals "cert_manager_enabled" "1") }}'
spec:
secretName: https-certificates
issuerRef:
name: '{{repl if (ConfigOptionEquals "cert_manager_provider" "incluster" ) }}ca-issuer{{repl else }}gitpod-issuer{{repl end }}'
kind: '{{repl if (ConfigOptionEquals "cert_manager_provider" "azure") }}ClusterIssuer{{repl else }}Issuer{{repl end }}'
name: '{{repl if (ConfigOptionEquals "tls_self_signed_enabled" "1" ) }}ca-issuer{{repl else }}gitpod-issuer{{repl end }}'
kind: '{{repl if or (ConfigOptionEquals "tls_self_signed_enabled" "1") (ConfigOptionNotEquals "cert_manager_provider" "azure") }}Issuer{{repl else }}ClusterIssuer{{repl end }}'
dnsNames:
- '{{repl ConfigOption "domain" }}'
- '*.{{repl ConfigOption "domain" }}'
Expand Down
29 changes: 17 additions & 12 deletions install/kots/manifests/kots-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,65 +246,70 @@ spec:
title: TLS certificates
description: Certificates are required to maintain a secure connection. The DNS names must be for `$DOMAIN`, `*.$DOMAIN` and `*.ws.$DOMAIN`.
items:
- name: tls_self_signed_enabled
title: Use a self-signed TLS certificate
type: bool
default: "0"
help_text: A self-signed certficate should only be used if applying TLS termination to your load balancer or other proxy.

- name: cert_manager_enabled
title: Use cert-manager
type: bool
default: "1"
when: '{{repl ConfigOptionEquals "tls_self_signed_enabled" "0" }}'
help_text: Automate certificate management with [cert-manager](https://cert-manager.io).

- name: cert_manager_acme_url
title: ACME URL
type: text
value: https://acme-v02.api.letsencrypt.org/directory
required: true
when: '{{repl ConfigOptionEquals "cert_manager_enabled" "1" }}'
when: '{{repl and (ConfigOptionEquals "tls_self_signed_enabled" "0") (ConfigOptionEquals "cert_manager_enabled" "1") }}'
help_text: The ACME URL is used to issue the certificates.

- name: cert_manager_email
title: Email address
type: text
required: false
when: '{{repl ConfigOptionEquals "cert_manager_enabled" "1" }}'
when: '{{repl and (ConfigOptionEquals "tls_self_signed_enabled" "0") (ConfigOptionEquals "cert_manager_enabled" "1") }}'
help_text: The email address to send renewal notifications to.

- name: cert_manager_provider
title: DNS01 provider
type: select_one
required: true
when: '{{repl ConfigOptionEquals "cert_manager_enabled" "1" }}'
help_text: A DNS01 challenge provider is used by cert-manager in order to generate the certificate. See the [specific documentation](https://cert-manager.io/docs/configuration/acme/dns01) for instructions on configuring your provider. In-cluster should only be used if applying TLS termination to your load balancer or other proxy.
when: '{{repl and (ConfigOptionEquals "tls_self_signed_enabled" "0") (ConfigOptionEquals "cert_manager_enabled" "1") }}'
help_text: A DNS01 challenge provider is used by cert-manager in order to generate the certificate. See the [specific documentation](https://cert-manager.io/docs/configuration/acme/dns01) for instructions on configuring your provider.
items:
- name: azure
title: AzureDNS
- name: gcp
title: Google CloudDNS
- name: incluster
title: In-cluster

- name: cert_manager_azure_subscription_id
title: Subscription ID
type: text
required: true
when: '{{repl and (ConfigOptionEquals "cert_manager_enabled" "1") (ConfigOptionEquals "cert_manager_provider" "azure") }}'
when: '{{repl and (ConfigOptionEquals "tls_self_signed_enabled" "0") (ConfigOptionEquals "cert_manager_enabled" "1") (ConfigOptionEquals "cert_manager_provider" "azure") }}'
help_text: The Azure subscription ID.

- name: cert_manager_azure_resource_group
title: Resource group
type: text
required: true
when: '{{repl and (ConfigOptionEquals "cert_manager_enabled" "1") (ConfigOptionEquals "cert_manager_provider" "azure") }}'
when: '{{repl and (ConfigOptionEquals "tls_self_signed_enabled" "0") (ConfigOptionEquals "cert_manager_enabled" "1") (ConfigOptionEquals "cert_manager_provider" "azure") }}'
help_text: The name of the resource group where the DNS zone exists.

- name: cert_manager_gcp_project
title: Project ID
type: text
required: true
when: '{{repl and (ConfigOptionEquals "cert_manager_enabled" "1") (ConfigOptionEquals "cert_manager_provider" "gcp") }}'
when: '{{repl and (ConfigOptionEquals "tls_self_signed_enabled" "0") (ConfigOptionEquals "cert_manager_enabled" "1") (ConfigOptionEquals "cert_manager_provider" "gcp") }}'
help_text: The ID of your GCP project.

- name: cert_manager_gcp_credentials
title: GCP service account key
when: '{{repl and (ConfigOptionEquals "cert_manager_enabled" "1") (ConfigOptionEquals "cert_manager_provider" "gcp") }}'
when: '{{repl and (ConfigOptionEquals "tls_self_signed_enabled" "0") (ConfigOptionEquals "cert_manager_enabled" "1") (ConfigOptionEquals "cert_manager_provider" "gcp") }}'
type: file
required: true
help_text: Download a [service account key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) with the `roles/dns.admin` role attached.
Expand All @@ -313,14 +318,14 @@ spec:
title: Certificate
type: file
required: true
when: '{{repl ConfigOptionEquals "cert_manager_enabled" "0" }}'
when: '{{repl and (ConfigOptionEquals "tls_self_signed_enabled" "0") (ConfigOptionEquals "cert_manager_enabled" "0") }}'
help_text: A file containing the TLS crt.

- name: tls_key
title: Private key
type: file
required: true
when: '{{repl ConfigOptionEquals "cert_manager_enabled" "0" }}'
when: '{{repl and (ConfigOptionEquals "tls_self_signed_enabled" "0") (ConfigOptionEquals "cert_manager_enabled" "0") }}'
help_text: A file containing the TLS private key.

- name: features
Expand Down