generated from validatedpatterns/vp-template-chart
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Externalize ZTVP charts: cert-manager #2
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
Open
minmzzhang
wants to merge
1
commit into
validatedpatterns:main
Choose a base branch
from
minmzzhang:externalizing-charts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Helm template files contain {{ }} and are not plain YAML | ||
| templates/ | ||
| # Keep [ ] for yamllint; Prettier would change to [] | ||
| values.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| extends: default | ||
| ignore: | ||
| - templates/ | ||
| - templates/** | ||
| - "**/templates/**" | ||
| rules: | ||
| document-start: disable | ||
| line-length: | ||
| max: 80 | ||
| brackets: | ||
| min-spaces-inside: 0 | ||
| max-spaces-inside: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,27 @@ | ||
| --- | ||
| apiVersion: v2 | ||
| description: A Helm chart to serve as the Validated Patterns Template | ||
| name: ocp-certmanager | ||
| description: > | ||
| A Helm chart to deploy OpenShift cert-manager operator with proper | ||
| DNS nameserver configuration. | ||
| type: application | ||
| # This is the chart version. This version number should be incremented each | ||
| # time you make changes to the chart and its templates, including the app | ||
| # version. Versions are expected to follow Semantic Versioning (semver.org). | ||
| version: 0.2.0 | ||
|
|
||
| # This is the version number of the application being deployed. This version | ||
| # number should be incremented each time you make changes to the application. | ||
| # It is recommended to use it with quotes. | ||
| appVersion: "1.16.0" | ||
| home: https://github.com/validatedpatterns/ocp-certmanager-chart | ||
| maintainers: | ||
| - name: Validated Patterns Team | ||
| email: [email protected] | ||
| icon: https://validatedpatterns.io/images/validated-patterns.png | ||
| keywords: | ||
| - pattern | ||
| name: vp-template | ||
| version: 0.0.1 | ||
| - cert-manager | ||
| - ssl | ||
| - tls | ||
| - certificates | ||
| - openshift | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,45 @@ | ||
| # vp-template | ||
| # ocp-certmanager | ||
|
|
||
|  | ||
| <!-- markdownlint-disable MD013 --> | ||
|
|
||
| A Helm chart to serve as the Validated Patterns Template | ||
|    | ||
|
|
||
| <!-- markdownlint-enable MD013 --> | ||
|
|
||
| <!-- markdownlint-disable MD013 --> | ||
|
|
||
| A Helm chart to deploy OpenShift cert-manager operator with proper DNS nameserver configuration. | ||
|
|
||
| <!-- markdownlint-enable MD013 --> | ||
|
|
||
| This chart is used to serve as the template for Validated Patterns Charts | ||
|
|
||
| ## Notable changes | ||
|
|
||
| **Homepage:** <https://github.com/validatedpatterns/ocp-certmanager-chart> | ||
|
|
||
| ## Maintainers | ||
|
|
||
| | Name | Email | Url | | ||
| | ----------------------- | ------------------------------------ | --- | | ||
| | Validated Patterns Team | <[email protected]> | | | ||
|
|
||
| <!-- markdownlint-disable MD013 MD034 MD060 --> | ||
|
|
||
| ## Values | ||
|
|
||
| | Key | Type | Default | Description | | ||
| | ----------------------------------- | ------ | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | certmgrOperator.additionalArgs | list | `[]` | Arguments to pass to the cert-manager controller (optional) Example: additionalArgs: - "--acme-http01-solver-nameservers=8.8.8.8:53,1.1.1.1:53" - "--v=2" | | ||
| | certmgrOperator.credentialsRequests | list | `[]` | Cloud credentials to use for the cert-manager (optional) You can specify multiple cloud credentials for different cloud providers. Used in combination with the solvers to create the DNS records. | | ||
| | certmgrOperator.issuers | list | `[]` | Issuers to use for the cert-manager (optional) You can specify multiple issuers for different challenges. | | ||
| | certmgrOperator.nameservers | list | `["8.8.8.8:53","1.1.1.1:53"]` | List of DNS server (ip:port strings) for DNS01 challenges. Defaults to [8.8.8.8:53, 1.1.1.1:53]. Necessary for DNS01 ACME solver; openshift's internal split-view DNS servers typically won't work. See: https://cert-manager.io/docs/configuration/acme/dns01/ #setting-nameservers-for-dns01-self-check | | ||
| | global | string | depends on the individual settings | Dictionary of the global settings to configure this chart | | ||
| | installerType | string | `"argocd"` | | | ||
| | operatorChannel | string | `"stable-v1"` | String the channel to install cert-manager from (Defaults to "stable-v1") | | ||
|
|
||
| <!-- markdownlint-enable MD013 MD034 MD060 --> | ||
|
|
||
| --- | ||
|
|
||
| Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| {{- /* | ||
| Validations for the acme issuer | ||
| */ -}} | ||
| {{- define "acme.validations" -}} | ||
| {{- if not .solvers }} | ||
| {{- fail "For the acme issuer, you must specify the properties solvers" }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{- /* | ||
| Validations for the credentials-request | ||
| */ -}} | ||
| {{- define "credential-request.validations" -}} | ||
| {{- if not .secretRef }} | ||
| {{- fail "CredentialRequest requires a SecretRef definition" }} | ||
| {{- end }} | ||
| {{- if not .providerSpec }} | ||
| {{- fail "CredentialRequest requires a providerSpec definition" }} | ||
| {{- end }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| {{- if .Values.certmgrOperator.issuers }} | ||
| {{- range .Values.certmgrOperator.issuers }} | ||
| {{- range $name, $issuer := . }} | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: ClusterIssuer | ||
| metadata: | ||
| name: {{ $name }} | ||
| {{- if eq $name "acme" }} | ||
| {{- include "acme.validations" $issuer }} | ||
| {{- end }} | ||
| spec: | ||
| {{ $name }}: | ||
| {{- tpl (toYaml $issuer) $ | nindent 4 }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| {{- if .Values.certmgrOperator.credentialsRequests }} | ||
| {{- range .Values.certmgrOperator.credentialsRequests }} | ||
| {{- include "credential-request.validations" . }} | ||
| apiVersion: cloudcredential.openshift.io/v1 | ||
| kind: CredentialsRequest | ||
| metadata: | ||
| name: {{ .name | default (printf "cert-manager-%s" (randAlpha 5 | lower)) }} | ||
| namespace: {{ .namespace | default $.Release.Namespace }} | ||
| spec: | ||
| {{- tpl (omit . "name" "namespace" | toYaml) $ | nindent 2 }} | ||
| {{- end }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| apiVersion: operator.openshift.io/v1alpha1 | ||
| kind: CertManager | ||
| metadata: | ||
| name: cluster | ||
| annotations: | ||
| {{- if eq .Values.installerType "argocd" }} | ||
| argocd.argoproj.io/sync-options: ServerSideApply=true, Validate=false, SkipDryRunOnMissingResource=true | ||
| {{- else if eq .Values.installerType "helm" }} | ||
| "helm.sh/hook": post-install | ||
| {{- else }} | ||
| # No annotation set | ||
| {{- end }} | ||
|
|
||
| spec: | ||
| managementState: "Managed" | ||
| {{- if .Values.certmgrOperator.nameservers }} | ||
| controllerConfig: | ||
| overrideArgs: | ||
| - "--dns01-recursive-nameservers={{ join "," .Values.certmgrOperator.nameservers }}" | ||
| - "--dns01-recursive-nameservers-only" | ||
| {{- if .Values.certmgrOperator.additionalArgs }} | ||
| {{- range .Values.certmgrOperator.additionalArgs }} | ||
| - "{{ . }}" | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,126 @@ | ||
| --- | ||
| # -- Dictionary of the global settings to configure this chart | ||
| # @default -- depends on the individual settings | ||
| global: | ||
|
|
||
| installerType: "argocd" | ||
|
|
||
| # -- String the channel to install cert-manager from (Defaults to "stable-v1") | ||
| operatorChannel: "stable-v1" | ||
|
|
||
| certmgrOperator: | ||
| # -- List of DNS server (ip:port strings) for DNS01 challenges. | ||
| # Defaults to [8.8.8.8:53, 1.1.1.1:53]. Necessary for DNS01 ACME solver; | ||
| # openshift's internal split-view DNS servers typically won't work. | ||
| # See: https://cert-manager.io/docs/configuration/acme/dns01/ | ||
| # #setting-nameservers-for-dns01-self-check | ||
| nameservers: | ||
| - 8.8.8.8:53 | ||
| - 1.1.1.1:53 | ||
|
|
||
| # -- Arguments to pass to the cert-manager controller (optional) | ||
| # Example: | ||
| # additionalArgs: | ||
| # - "--acme-http01-solver-nameservers=8.8.8.8:53,1.1.1.1:53" | ||
| # - "--v=2" | ||
| additionalArgs: [ ] | ||
|
|
||
| # -- Issuers to use for the cert-manager (optional) | ||
| # You can specify multiple issuers for different challenges. | ||
| issuers: [ ] | ||
|
|
||
| # -- ACME settings | ||
| # - acme: | ||
| # -- Email to use for ACME account | ||
| # email: "[email protected]" | ||
| # -- Secret resource to store ACME account's private key | ||
| # privateKeySecretRef: | ||
| # name: "acme-account-key" | ||
| # -- ACME server to use | ||
| # Examples: | ||
| # - https://acme-staging-v02.api.letsencrypt.org/directory | ||
| # - https://acme-v02.api.letsencrypt.org/directory | ||
| # server: "https://acme-staging-v02.api.letsencrypt.org/directory" | ||
| # -- ACME solvers to use (optional) | ||
| # You can specify multiple solvers for different challenges. | ||
| # solvers: [] | ||
| # Examples: | ||
| # - dns01: | ||
| # -- AWS Route53 example | ||
| # route53: | ||
| # region: "us-east-1" | ||
| # accessKeyIDSecretRef: | ||
| # name: "aws-credentials" | ||
| # key: aws_access_key_id | ||
| # secretAccessKeySecretRef: | ||
| # name: "aws-credentials" | ||
| # key: aws_secret_access_key | ||
| # hostedZoneID: "hosted-zone-id" | ||
| # -- Azure example | ||
| # azureDNS: | ||
| # resourceGroupName: "my-resource-group" | ||
| # subscriptionID: "my-subscription-id" | ||
| # hostedZoneName: "my-hosted-zone-name" | ||
| # environment: "AzurePublicCloud" | ||
| # managedIdentity: | ||
| # clientID: "my-client-id" | ||
| # -- GCP example | ||
| # cloudDNS: | ||
| # project: "my-project" | ||
| # serviceAccountSecretRef: | ||
| # name: "my-service-account" | ||
| # key: "my-key" | ||
| # -- Cloudflare example | ||
| # cloudflare: | ||
| # apiTokenSecretRef: | ||
| # name: "my-api-key" | ||
| # key: "my-key" | ||
|
|
||
| # -- Cloud credentials to use for the cert-manager (optional) | ||
| # You can specify multiple cloud credentials for different cloud providers. | ||
| # Used in combination with the solvers to create the DNS records. | ||
| credentialsRequests: [ ] | ||
| # -- AWS example | ||
| # - name: aws | ||
| # secretRef: | ||
| # name: "aws-credentials" | ||
| # namespace: "cert-manager" | ||
| # providerSpec: | ||
| # apiVersion: cloudcredential.openshift.io/v1 | ||
| # kind: "AWSProviderSpec" | ||
| # statementEntries: | ||
| # - effect: Allow | ||
| # action: | ||
| # - route53:GetChange | ||
| # resource: "arn:aws:route53:::change/*" | ||
| # - effect: Allow | ||
| # action: | ||
| # - route53:ChangeResourceRecordSets | ||
| # - route53:ListResourceRecordSets | ||
| # resource: "arn:aws:route53:::hostedzone/*" | ||
| # -- Can be removed if you specify the (optional) hostedZoneID. | ||
| # - effect: Allow | ||
| # action: | ||
| # - route53:ListHostedZones | ||
| # resource: "*" | ||
| # -- Azure example | ||
| # - name: azure | ||
| # secretRef: | ||
| # name: "azure-credentials" | ||
| # namespace: "cert-manager" | ||
| # providerSpec: | ||
| # apiVersion: cloudcredential.openshift.io/v1 | ||
| # kind: "AzureProviderSpec" | ||
| # roleBindings: | ||
| # - role: "DNS Zone Contributor" | ||
| # -- GCP example | ||
| # - name: gcp | ||
| # secretRef: | ||
| # name: "gcp-credentials" | ||
| # namespace: "cert-manager" | ||
| # providerSpec: | ||
| # apiVersion: cloudcredential.openshift.io/v1 | ||
| # kind: "GCPProviderSpec" | ||
| # predefinedRoles: | ||
| # - "roles/dns.admin" | ||
| # gcpServiceAccount: "cert-manager-clusterName-dns" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we particular about the appVersion here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is from the original charts/certmanager, it's not harmful but informative metadata to be there IMHO