Commit Graph

568 Commits

Author SHA1 Message Date
Jonathan Boulle
526d31bbc0 Fix various typos in spelling of Certificate 2018-02-26 20:07:06 +01:00
Kiall Mac Innes
054b99f3ba Helm Chart: Add support for affinity and tolerations
Adds support for setting the node affinity and tolerations scheduling options
2018-02-26 15:40:29 +00:00
jetstack-ci-bot
0a0a2f3b13
Merge pull request #346 from rjeczalik/patch-1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

docs: fix value name that disables rbac

**What this PR does / why we need it**:

Proper documentation for deploying cert-manager for k8s clusters without rbac enabled (happens to be the default for cdk on localhost).

**Which issue this PR fixes**

No issue per se, a follow-up on #256.
2018-02-25 20:20:05 +00:00
jetstack-ci-bot
010e6c87e4
Merge pull request #343 from munnerz/rbac-endpoints
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add Endpoints back into the cert-manager RBAC policy

**What this PR does / why we need it**:

Adds permission to CRUD Endpoints resources back into the cert-manager RBAC role. This is to prevent deployments using the 'master' version of the Helm chart failing when deploying a pre-0.3 (unreleased) release of cert-manager.

We will remove this in 0.4. This is in order to reduce friction for new users if they forget/decide not to use a tagged release of the Helm chart.

**Release note**:
```release-note
NONE
```

/cc @davecheney @mikebryant
2018-02-25 20:19:02 +00:00
Rafal Jeczalik
c01dd256eb
docs: fix property name that disables rbac 2018-02-25 09:02:24 +01:00
James Munnelly
8cb1e79825 Add Endpoints back into the cert-manager RBAC policy 2018-02-24 10:27:11 +00:00
jetstack-ci-bot
97ce5ca2b3
Merge pull request #329 from munnerz/default-cluster-namespace
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Set default cluster resource namespace to current pod namespace

**What this PR does / why we need it**:

Changes the default cluster resource namespace from kube-system to the current namespace of the cert-manager deployment.

**Which issue this PR fixes**: fixes #103 

**Release note**:
```release-note
Supporting resources for ClusterIssuer's (e.g. signing CA certificates, or ACME account private keys) will now be stored in the same namespace as cert-manager, instead of kube-system in previous versions. Action required: you will need to ensure to properly manually migrate these referenced resources across into the deployment namespace of cert-manager, else cert-manager may not be able to find account private keys or signing CA certificates.
```

/cc @mikebryant
2018-02-23 19:56:21 +00:00
James Munnelly
30c28975cb Update cluster resource namespace during e2e tests 2018-02-23 11:18:58 +00:00
jetstack-ci-bot
f302862610
Merge pull request #340 from munnerz/static-manifest-ns
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Create a Namespace resource as part of the static manifest bundle

**What this PR does / why we need it**:

Create a Namespace resource as part of the static deployment manifests bundle, to make it easier for users to deploy cert-manager without a Helm chart

**Release note**:
```release-note
NONE
```

/cc @davecheney @wallrj
2018-02-23 11:01:33 +00:00
James Munnelly
105c6c149e Create a Namespace resource as part of the static manifest bundle 2018-02-23 09:13:06 +00:00
jetstack-ci-bot
09c6a09584
Merge pull request #330 from munnerz/namespaced-deploy-manifests
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update default deployment namespace to be 'cert-manager'

**What this PR does / why we need it**:

Previously, our deployment manifests deployed into the 'default' namespace. This changes them to deploy into 'cert-manager' instead.

**Release note**:
```release-note
The static deployment manifests now automatically deploy into the 'cert-manager' namespace by default
```
2018-02-22 23:25:55 +00:00
jetstack-ci-bot
7533e0e329
Merge pull request #332 from munnerz/err-prefixed-events
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Rename Event types to be prefixed 'Err' instead of 'Error' for brevity

**What this PR does / why we need it**:

Shortens the event type names we use to be prefixed 'Err' instead of 'Error'

**Special notes for your reviewer**:

This brings us in-line with the issuer and cluster issuer controllers, and other controllers in Kubernetes.

**Release note**:
```release-note
Rename Event types to be prefixed 'Err' instead of 'Error' for brevity
```
2018-02-22 10:21:22 +00:00
jetstack-ci-bot
c4cdd405a4
Merge pull request #331 from munnerz/no-crt-warning
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make existing TLS certificate check emit a Normal event instead of Warning when the existing certificate is invalid

**What this PR does / why we need it**:

Previously, when requesting a certificate for the first time, the following events are logged:

```
  Warning  ErrorCheckCertificate  1m                 cert-manager-controller  Error checking existing TLS certificate: secret "httpbin" not found
  Normal   PrepareCertificate     1m                 cert-manager-controller  Preparing certificate with issuer
```

This has caused confusion for users when they see a Warning/Error being logged. This PR changes that to be:

```
  Normal   ErrorCheckCertificate  1m                 cert-manager-controller  Error checking existing TLS certificate, will re-issue: secret "httpbin" not found
  Normal   PrepareCertificate     1m                 cert-manager-controller  Preparing certificate with issuer
```

**Release note**:
```release-note
Clearer event logging when issuing a certificate for the first time
```
2018-02-22 09:48:21 +00:00
James Munnelly
ce0384a196 Rename Event types to be prefixed 'Err' instead of 'Error' for brevity 2018-02-22 07:53:51 +00:00
James Munnelly
70e7c5265b Make existing TLS certificate check emit a Normal event instead of Warning when the existing certificate is invalid 2018-02-22 07:48:58 +00:00
James Munnelly
4afc72d166 Update default deployment namespace to be 'cert-manager' 2018-02-22 07:35:54 +00:00
James Munnelly
ce73a22f6f Set default cluster resource namespace to current pod namespace 2018-02-22 07:24:29 +00:00
jetstack-ci-bot
362735f8f1
Merge pull request #312 from Mikulas/pr/cert-crd-alias
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add default shortNames to certificates CRD

Defaults to `[cert, certs]` and is configurable with `certificateCRDShortNames` parameter.

**What this PR does / why we need it**:

Simplifies manual certificate management with kubectl.

Fixes #311

<div name="review-notes" />

**Special notes for your reviewer**:

Instead of a boolean switch do/dont include the shortNames, the value defines the aliases. This may be handy if anybody prefers `[crt, crts]` instead.

I'm not too keen on the `certificateCRDShortNames` variable name. It might be better to use `Resource` instead of `CRD` to be consistent with the `createCustomResource` var.

Other CRDs are probably ok without an alias, but other people workflows may differ. Should these also be configurable? In that case, the variables could be `shortNames: {certificates: [], …}`.

**Release note**:

```release-note
Add Certificate CRD shortnames `cert` and `certs`. This is configurable in the Helm Chart with `certificateResourceShortNames`.
```
2018-02-21 20:48:17 +00:00
Mikuláš Dítě
d884404159 Add default shortNames to certificates CRD
Defaults to [cert, certs] and is configurable with
`certificateCRDShortNames` parameter.

[Closes #311]
2018-02-21 20:37:25 +01:00
jetstack-ci-bot
721a4042cd
Merge pull request #327 from ocadotechnology/wip-293
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix: Use ConfigMaps for leaderelection

**What this PR does / why we need it**:
Use ConfigMaps for leader election. Improves scalability by not modifying Endpoints, which are watched by kube-proxy.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #293

**Special notes for your reviewer**:

**Release note**:

```release-note
action required: Before upgrading, scale the cert-manager Deployment to 0, to avoid two controllers attempting to operate on the same resources
```
2018-02-21 18:22:27 +00:00
Mike Bryant
0274964100 fix: Use ConfigMaps for leaderelection
Fixes #293
2018-02-21 17:48:13 +00:00
jetstack-ci-bot
46307a0eb3
Merge pull request #325 from wmedlar/bugfix/tls-acme-annotation-value
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Check the value of the tls-acme annotation, not just its existence

**What this PR does / why we need it**: Previously the ingress-shim would sync an Ingress resource if it simply contained the `kubernetes.io/tls-acme` annotation, regardless of the value; now it will only do so if the annotation value is truthy (e.g., "true", "t", "1", so forth).



**Special notes for your reviewer**: This could probably be done in a way that doesn't disrupt the function's aesthetics so much. Open to all suggestions.

**Release note**:

```release-note
ingress-shim will only sync Ingress resources with `kubernetes.io/tls-acme` annotation if the value of that annotation is true.
```
2018-02-21 17:40:59 +00:00
jetstack-ci-bot
430505d1d7
Merge pull request #326 from jetstack/munnerz-patch-1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Install Helm during .gitlab-ci.yml release build

Install Helm during .gitlab-ci.yml script

(in future, this file will go away altogether once we have set up a 'trusted' build cluster to push releases)

**Release note**:
```release-note
NONE
```

/assign
2018-02-21 17:23:32 +00:00
James Munnelly
f38efb4d0a
Update .gitlab-ci.yml 2018-02-21 17:00:32 +00:00
Will Medlar
86ab9a9794 Add test cases for falsey tls-acme annotation values 2018-02-21 11:00:21 -06:00
Will Medlar
a709f0ad42 Check the value of the tls-acme annotation, not just its existence 2018-02-21 10:43:30 -06:00
James Munnelly
e410af5e6a
Install Helm during .gitlab-ci.yml release build 2018-02-21 16:38:45 +00:00
jetstack-ci-bot
058a259f7a
Merge pull request #321 from twz123/fix-log-warning
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Log potential errors while waiting for DNS record propagation

**What this PR does / why we need it**:
This helps debugging, e.g. if there are network problems.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2018-02-21 13:39:28 +00:00
jetstack-ci-bot
b18acf1d7e
Merge pull request #246 from mwieczorek/azure-dns
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Added Azure DNS support for DNS01 challange 

**What this PR does / why we need it**:
Adds another provider (Azure DNS) for DNS01 challange

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #230 

**Special notes for your reviewer**:

**Release note**:

```release-note
ACME DNS-01 challenge mechanism for Azure DNS
```
2018-02-21 13:20:30 +00:00
jetstack-ci-bot
9e0e333311
Merge pull request #317 from radhus/bundle-ca-in-cert
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bundle the CA public key in issued certificate

**What this PR does / why we need it**:

If the CA used is only an intermediate CA, and the root CA is trusted by the client, the client needs help verifying the certificate chain.

This also makes the CA present in the certificate even if it's the root CA.

**Which issue this PR fixes**:

Trusting certs issued by intermediate CAs used by cert-manager.

**Special notes for your reviewer**:

I have tested this locally with my own intermediate CA used by cert-manager, issued by my own root CA trusted by my macOS client. The whole certificate chain is now presented in the browser.

The idea to just append the certificates is based on cfssl's mkbundle:
https://github.com/cloudflare/cfssl/blob/1.3.0/cmd/mkbundle/mkbundle.go#L97

**Release note**:
```release-note
CA Issuer: bundle CA certificate with issued certificates
```
2018-02-21 10:59:48 +00:00
Tom Wieczorek
822500c439
Log potential errors while waiting for DNS record propagation
This helps debugging, e.g. if there are network problems.
2018-02-21 10:19:36 +01:00
William Johansson
6ff1746898 Bundle the CA public key in issued certificate
If the CA used is only an intermediate CA, and the root CA is trusted by
the client, the client needs help verifying the certificate chain.
2018-02-18 21:28:22 +01:00
mwieczorek
cc89fe59aa Added Azure DNS support for DNS01 challange 2018-02-13 10:34:06 +01:00
jetstack-ci-bot
e1aa30e467
Merge pull request #307 from munnerz/e2e-verify-cert
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Ensure certificate is valid for given domains during e2e tests

**What this PR does / why we need it**:

Updates our e2e tests to ensure the certificate being tested is valid for the domains requested on the certificate under test

**Release note**:
```release-note
NONE
```
2018-02-09 22:15:45 +00:00
James Munnelly
827dacc1c0 Ensure certificate is valid for given domains during e2e tests 2018-02-09 20:52:31 +00:00
jetstack-ci-bot
5a78384e14
Merge pull request #295 from stamm/patch-1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix multiline command

Fixed typo in documenation
2018-02-08 15:37:46 +00:00
James Munnelly
72a7490303
Merge pull request #298 from jetstack/owners
Update OWNERS
2018-02-08 15:22:33 +00:00
James Munnelly
b6dd217b4c
Update OWNERS 2018-02-08 15:21:36 +00:00
Rustam Zagirov
75b4938759
fix multiline command 2018-02-07 14:55:44 +03:00
jetstack-ci-bot
a3e463f92b
Merge pull request #290 from munnerz/update-chart
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update helm chart to align with k/charts feedback

**What this PR does / why we need it**:

This PR brings the helm chart in line with what is found in kubernetes/charts (changes contained here: 008d52cbc4).

It also addresses some feedback (https://github.com/kubernetes/charts/issues/3513) in order to improve our post-installation documentation by providing links to how to configure issuers/ingress-shim.

**Release note**:
```release-note
Remove default resource requests in Helm chart. Improve post-deployment informational messages.
```
2018-02-06 10:08:57 +00:00
James Munnelly
5aa3c091e9 Run hack/update-deploy-gen.sh 2018-02-05 19:16:47 +00:00
James Munnelly
6e2ddc240a Update helm chart to align with k/charts review 2018-02-05 19:10:10 +00:00
jetstack-ci-bot
35adb0ea13
Merge pull request #276 from munnerz/gen-deploy
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Generate and publish deployment manifests for cert-manager

**What this PR does / why we need it**:

This adds scripts to automatically generate deployment manifests for cert-manager.
This allows us to keep the helm chart as the authoritative source of truth, but still publish an alternate deployment mechanism.

If the Helm chart changes, or any of the values files change, the developer submitting the PR will need to run `./hack/update-deploy-gen.sh`. CI automatically verifies these files are up to date.

As a result of this, and due to https://github.com/kubernetes/helm/issues/3377, I have removed support for TPR creation in the Helm chart based on server capabilities. CRDs have been present since 1.7, and we do not test against 1.6 so I propose we drop support unless the user configures it manually. Besides, there's currently no way to disable the ClusterIssuer control loop meaning cert-manager doesn't run on 1.6 anyway (#201).

**Which issue this PR fixes**:

Fixes #272 

**Release note**:
```release-note
Provide static deployment manifests as an alternative to a Helm chart based deployment
```

/cc @f-f @whereisaaron
2018-01-25 18:06:35 +00:00
James Munnelly
4a63f9a600 Run verify-deploy-gen as part of make verify 2018-01-25 16:28:19 +00:00
James Munnelly
c9f1c0e07d Run hack/update-deploy-gen.sh 2018-01-25 16:28:15 +00:00
James Munnelly
0d3790567a Add deployment manifest generation scripts 2018-01-25 16:27:29 +00:00
jetstack-ci-bot
d35afcc514
Merge pull request #275 from jetstack/munnerz-patch-2
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove unused file

Remove an old piece of code that is not used

```release-note
NONE
```
2018-01-25 10:39:42 +00:00
James Munnelly
976a96267a Remove support for creating TPRs in Helm chart 2018-01-24 19:03:55 +00:00
James Munnelly
296f6e334c
Remove unused file 2018-01-24 17:17:41 +00:00
jetstack-ci-bot
a4a05595d5
Merge pull request #274 from munnerz/junit
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Optionally write junit reports into artifacts during e2e tests

**What this PR does / why we need it**:

Output junit reports during e2e tests for gubernator to display test details more clearly.

/release-note-none
/assign
2018-01-24 15:24:51 +00:00