Skip to content
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

docs: add keptn certificate manager infos #652

Merged
merged 35 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f4d89e9
changed readmes
RealAnna Jan 18, 2023
05f8056
changed install.md
RealAnna Jan 18, 2023
db4f0fe
removed cert managre from examples
RealAnna Jan 18, 2023
0775b5c
added duble install instruction
RealAnna Jan 18, 2023
cd73f4f
added back some ref
RealAnna Jan 19, 2023
cac2b80
added back some ref
RealAnna Jan 19, 2023
40f9255
rebased
RealAnna Jan 19, 2023
a8e5521
Update README.md
RealAnna Jan 20, 2023
d275ff9
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 20, 2023
5a31779
Update docs/content/en/docs/snippets/tasks/install.md
RealAnna Jan 20, 2023
36f95d6
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 20, 2023
9b8a36f
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 20, 2023
3e88032
Update docs/content/en/docs/snippets/tasks/install.md
RealAnna Jan 20, 2023
c952a26
Update docs/content/en/docs/snippets/tasks/install.md
RealAnna Jan 20, 2023
1ada8bb
as per review
RealAnna Jan 26, 2023
9871d9b
Update README.md
RealAnna Jan 26, 2023
450318e
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 26, 2023
ba19761
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 26, 2023
b5ce2da
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 26, 2023
305579d
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 26, 2023
3a31a26
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 26, 2023
c5f9cbc
Update docs/content/en/docs/snippets/tasks/install.md
RealAnna Jan 26, 2023
4a27603
Update docs/content/en/docs/snippets/tasks/install.md
RealAnna Jan 26, 2023
a96959b
Update docs/content/en/docs/snippets/tasks/install.md
RealAnna Jan 26, 2023
f010a35
Update klt-cert-manager/README.md
RealAnna Jan 26, 2023
97f1a21
Update klt-cert-manager/README.md
RealAnna Jan 26, 2023
5831475
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 27, 2023
8ef3780
Update klt-cert-manager/README.md
RealAnna Jan 27, 2023
4a78d80
Update docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md
RealAnna Jan 27, 2023
b8bb32b
Update docs/content/en/docs/snippets/tasks/install.md
RealAnna Jan 30, 2023
4a3dd8a
Update docs/content/en/docs/snippets/tasks/install.md
RealAnna Jan 30, 2023
3a6e5f7
Update klt-cert-manager/Makefile
RealAnna Jan 30, 2023
15c09c2
Update klt-cert-manager/README.md
RealAnna Jan 30, 2023
3e39b69
Update klt-cert-manager/README.md
RealAnna Jan 30, 2023
e32eee8
fix: security pipeline
RealAnna Jan 30, 2023
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
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ Click to watch it on YouTube:

**Installation**

The Lifecycle Toolkit includes a Mutating Webhook which requires TLS certificates to be mounted as a volume in its pod. The certificate creation
is handled automatically by [cert-manager](https://cert-manager.io). To install **cert-manager**, execute the following command:

```console
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml
```

When *cert-manager* is installed, you can run

<!---x-release-please-start-version-->

Expand All @@ -47,6 +39,10 @@ The Lifecycle Toolkit uses the OpenTelemetry collector to provide a vendor-agnos
process and export telemetry data. To install it, follow their [installation instructions](https://opentelemetry.io/docs/collector/getting-started/).
We also provide some more information about this in our [observability example](./examples/support/observability/).

The Lifecycle Toolkit includes a Mutating Webhook which requires TLS certificates to be mounted as a volume in its pod. The certificate creation
is handled automatically by [klt-cert-manager](https://github.com/keptn/lifecycle-toolkit/blob/main/klt-cert-manager/README.md). Versions 0.5.0 and earlier have a hard dependency on the [cert-manager](https://cert-manager.io).
See [installation guideline](https://github.com/keptn/lifecycle-toolkit/blob/main/docs/content/docs/snippets/tasks/install.md) for more info.

## Goals

The Keptn Lifecycle Toolkit aims to support Cloud Native teams with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ icon: concepts
layout: quickstart
weight: 5
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html
---
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Keptn Certificate Manager
icon: concepts
layout: quickstart
weight: 5
hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html
---

### Keptn Cert Manager

The Lifecycle Toolkit includes a Mutating Webhook which requires TLS certificates to be mounted as a volume in its pod. In version 0.6.0 and later, the certificate creation
is handled automatically by the [klt-cert-manager](https://github.com/keptn/lifecycle-toolkit/blob/main/klt-cert-manager/README.md).

The certificate is created as a secret in the `keptn-lifecycle-toolkit-system` namespace with a renewal threshold of 12 hours.
If it expires, the [klt-cert-manager](https://github.com/keptn/lifecycle-toolkit/blob/main/klt-cert-manager/README.md) renews it.
The Lifecycle Toolkit operator waits for a valid certificate to be ready.
The certificate is mounted on an empty dir volume in the operator.

When a certificate is left over from an older version, the webhook or the operator may generate errors because of an invalid certificate. To solve this, delete the certificate and restart the operator.

28 changes: 20 additions & 8 deletions docs/content/en/docs/snippets/tasks/install.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
At the moment, the lifecycle controller needs *cert-manager* to be installed. Therefore, you can install cert-manager using:

## Install version 0.6.0 and above

In version 0.6.0 and later, you can install the Lifecycle Toolkit using the current release manifest:
<!---x-release-please-start-version-->
```
kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.5.0/manifest.yaml
kubectl wait --for=condition=Available deployment/klc-controller-manager -n keptn-lifecycle-toolkit-system --timeout=120s
```
<!---x-release-please-end-->

The Lifecycle Toolkit and its dependencies are now installed and ready to use.

## Install version 0.5.0 and earlier

You must first install *cert-manager* with the following commands:

<!--
[cert-manager](https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml)
Expand All @@ -8,12 +23,9 @@ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/
kubectl wait --for=condition=Available deployment/cert-manager-webhook -n cert-manager --timeout=60s
```

After that, you can install the lifecycle toolkit using the current release manifest:
<!---x-release-please-start-version-->
After that, you can install the Lifecycle Toolkit <oldversion> with:

```
kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.5.0/manifest.yaml
kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/<oldversion>/manifest.yaml
kubectl wait --for=condition=Available deployment/klc-controller-manager -n keptn-lifecycle-toolkit-system --timeout=120s
```
<!---x-release-please-end-->

Now, the Lifecycle Toolkit and its dependency is installed and ready to use.
```
9 changes: 1 addition & 8 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ JAEGER_VERSION ?= v1.39.0
TOOLKIT_NAMESPACE ?= keptn-lifecycle-toolkit-system
PODTATO_NAMESPACE ?= podtato-kubectl
GRAFANA_PORT_FORWARD ?= 3000
# renovate: datasource=github-tags depName=cert-manager/cert-manager
CERT_MANAGER_VERSION ?= v1.11.0

.PHONY: install
install: install-cert-manager install-observability install-argo
install: install-observability install-argo
@echo "-----------------------------------"
@echo "Create Namespace and install Keptn-lifecycle-toolkit"
@echo "-----------------------------------"
Expand All @@ -23,11 +21,6 @@ install-observability:
install-argo:
make -C support/argo install

.PHONY: install-cert-manager
install-cert-manager:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MANAGER_VERSION)/cert-manager.yaml
kubectl wait --for=condition=available deployment/cert-manager-webhook -n cert-manager --timeout=300s

.PHONY: port-forward-jaeger
port-forward-jaeger:
make -C support/observability port-forward-jaeger
Expand Down
2 changes: 0 additions & 2 deletions examples/support/argo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ PODTATO_NAMESPACE ?= podtato-kubectl
ARGO_NAMESPACE ?= argocd
# renovate: datasource=github-tags depName=argoproj/argo-cd
ARGO_VERSION ?= v2.5.7
# renovate: datasource=github-tags depName=cert-manager/cert-manager
CERT_MANAGER_VERSION ?= v1.11.0
ARGO_SECRET = $(shell kubectl -n ${ARGO_NAMESPACE} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo)

.PHONY: install
Expand Down
9 changes: 5 additions & 4 deletions klt-cert-manager/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# cert-manager
// TODO(user): Add simple overview of use/purpose
# klt-cert-manager
The Keptn certificate manager ensures that the webhooks in the Lifecycle Toolkit operator can obtain a valid certificate to access the Kubernetes API server.

## Description
// TODO(user): An in-depth paragraph about your project and overview of use
This `klt-cert-manager` operator should only be installed when paired with the Lifecycle Toolkit operator.
The TLS certificate is mounted as a volume in the LT operator pod and is renewed every 12 hours or every time the LT operator deployment changes.


## Getting Started
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.
Expand Down Expand Up @@ -42,7 +44,6 @@ make undeploy
```

## Contributing
// TODO(user): Add detailed information on how you would like others to contribute to this project

### How it works
This project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)
Expand Down
3 changes: 1 addition & 2 deletions klt-cert-manager/config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ bases:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
#- ../webhook
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
#- ../certmanager

# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus

Expand Down