Skip to content

Commit

Permalink
Merge pull request #11308 from hakman/automated-cherry-pick-of-#11281…
Browse files Browse the repository at this point in the history
…-upstream-release-1.20

Automated cherry pick of #11281: Add ability to set a default Issuer in certManager addon
  • Loading branch information
k8s-ci-robot committed Apr 24, 2021
2 parents 7634978 + 49e32ea commit 82e71db
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Cert-manager handles x509 certificates for your cluster.
spec:
certManager:
enabled: true
defaultIssuer: yourDefaultIssuer
```

**Warning: cert-manager only supports one installation per cluster. If you are already running cert-manager, you need to remove this installation prior to enabling this addon. As long as you are using v1 versions of the cert-manager resources, it is safe to remove existing installs and replace it with this addon**
Expand Down Expand Up @@ -300,4 +301,4 @@ spec:
}
]
```
The masters will poll for changes in the bucket and keep the addons up to date.
The masters will poll for changes in the bucket and keep the addons up to date.
4 changes: 4 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ spec:
certManager:
description: CertManager determines the metrics server configuration.
properties:
defaultIssuer:
description: 'defaultIssuer sets a default clusterIssuer Default:
none'
type: string
enabled:
description: 'Enabled enables the cert manager. Default: false'
type: boolean
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,10 @@ type CertManagerConfig struct {
// Image is the docker container used.
// Default: the latest supported image for the specified kubernetes version.
Image *string `json:"image,omitempty"`

// defaultIssuer sets a default clusterIssuer
// Default: none
DefaultIssuer *string `json:"defaultIssuer,omitempty"`
}

// AWSLoadBalancerControllerConfig determines the AWS LB controller configuration.
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,10 @@ type CertManagerConfig struct {
// Image is the docker container used.
// Default: the latest supported image for the specified kubernetes version.
Image *string `json:"image,omitempty"`

// defaultIssuer sets a default clusterIssuer
// Default: none
DefaultIssuer *string `json:"defaultIssuer,omitempty"`
}

// AWSLoadBalancerControllerConfig determines the AWS LB controller configuration.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion upup/models/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26279,6 +26279,11 @@ spec:
- --cluster-resource-namespace=$(POD_NAMESPACE)
- --leader-election-namespace=kube-system
- --enable-certificate-owner-ref=true
{{ if .CertManager.DefaultIssuer }}
- --default-issuer-name={{ .CertManager.DefaultIssuer }}
- --default-issuer-kind=ClusterIssuer
- --default-issuer-group=cert-manager.io
{{ end }}
env:
- name: POD_NAMESPACE
valueFrom:
Expand All @@ -26297,7 +26302,7 @@ spec:
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists

---
apiVersion: apps/v1
kind: Deployment
Expand Down

0 comments on commit 82e71db

Please sign in to comment.