Skip to content

Commit

Permalink
docs: copy content to new docs engine (keptn#2605)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisthat authored Nov 30, 2023
1 parent d8ec91e commit 7a4239f
Show file tree
Hide file tree
Showing 133 changed files with 14,174 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- 'epic/*'
paths-ignore:
- "docs/**"
- "docs-new/**"
- "**.md"
- "netlify.toml"

Expand Down
1 change: 1 addition & 0 deletions docs-new/assets/javascripts/versions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// VERSION WARNINGS
window.addEventListener("DOMContentLoaded", function() {
return; //TODO: decide if we want this
var rtdData = window['READTHEDOCS_DATA'] || { version: 'latest' };
var margin = 30;
var headerHeight = document.getElementsByClassName("md-header")[0].offsetHeight;
Expand Down
23 changes: 23 additions & 0 deletions docs-new/docs/assets/crd/analysis-definition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: metrics.keptn.sh/v1beta1
kind: AnalysisDefinition
metadata:
name: ad-my-proj-dev-svc1
namespace: keptn-system
spec:
objectives:
- analysisValueTemplateRef:
name: response-time-p95
namespace: keptn-system
target:
failure:
lessThan:
fixedValue: 600
warning:
inRange:
lowBound: 300
highBound: 500
weight: 1
keyObjective: false
totalScore:
passPercentage: 90
warningPercentage: 75
15 changes: 15 additions & 0 deletions docs-new/docs/assets/crd/analysis-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: metrics.keptn.sh/v1beta1
kind: AnalysisValueTemplate
metadata:
labels:
app.kubernetes.io/name: analysisvaluetemplate
app.kubernetes.io/instance: analysisvaluetemplate-sample
app.kubernetes.io/part-of: metrics-operator
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: metrics-operator
name: response-time-p95
namespace: keptn-system
spec:
provider:
name: prometheus
query: "sum(kube_pod_container_resource_limits{node='{{.nodename}}'}) - sum(kube_node_status_capacity{node='{{.nodename}}'})"
21 changes: 21 additions & 0 deletions docs-new/docs/assets/crd/analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: metrics.keptn.sh/v1beta1
kind: Analysis
metadata:
labels:
app.kubernetes.io/name: analysis
app.kubernetes.io/instance: analysis-sample
app.kubernetes.io/part-of: metrics-operator
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: metrics-operator
name: analysis-sample
spec:
timeframe:
recent: 5m
args:
project: my-project
stage: dev
service: svc1
nodename: test # can be any key/value pair; NOT only project/stage/service
analysisDefinition:
name: ad-my-proj-dev-svc1
namespace: keptn-system
11 changes: 11 additions & 0 deletions docs-new/docs/assets/crd/eval.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnEvaluationDefinition
metadata:
name: app-pre-deploy-eval-2
namespace: podtato-kubectl
spec:
objectives:
- keptnMetricRef:
name: available-cpus
namespace: podtato-kubectl
evaluationTarget: ">1"
10 changes: 10 additions & 0 deletions docs-new/docs/assets/crd/metric.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: metrics.keptn.sh/v1beta1
kind: KeptnMetric
metadata:
name: available-cpus
namespace: podtato-kubectl
spec:
provider:
name: my-provider
query: "sum(kube_node_status_capacity{resource='cpu'})"
fetchIntervalSeconds: 10
16 changes: 16 additions & 0 deletions docs-new/docs/assets/crd/python-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnTaskDefinition
metadata:
name: scheduled-deployment
spec:
python:
configMapRef:
name: python-test-cm
---
apiVersion: v1
kind: ConfigMap
metadata:
name: python-test-cm
data:
code: |
print("Hello, World!")
31 changes: 31 additions & 0 deletions docs-new/docs/assets/crd/python-context.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: Opaque
data:
SECURE_DATA: dG9rZW46IG15dG9rZW4=
---
apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnTaskDefinition
metadata:
name: pre-deployment-hello
annotations:
python: test
spec:
python:
parameters:
map:
user: "myuser"
secureParameters:
secret: mysecret
cmdParameters: "-h"
inline:
code: |
import os
import yaml
data = os.getenv('DATA')
dct = yaml.safe_load(data)
USER= dct['user']
PASSWORD = os.environ.get('SECURE_DATA')
print(USER,PASSWORD)
14 changes: 14 additions & 0 deletions docs-new/docs/assets/crd/python-inline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnTaskDefinition
metadata:
name: scheduled-deployment-inline
spec:
python:
parameters:
map:
mydata: "my-user-defined"
inline:
code: |
# Get environment variables
data = os.getenv('DATA')
print(data)
34 changes: 34 additions & 0 deletions docs-new/docs/assets/crd/python-libs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnTaskDefinition
metadata:
name: python-inline
spec:
python:
inlineRef:
code: |
import sys
import json
import yaml
print("Hello, World!")
dct = yaml.safe_load('''
name: John
age: 30
automobiles:
- brand: Honda
type: Odyssey
year: 2018
- brand: Toyota
type: Sienna
year: 2015
''')
assert dct['name'] == 'John'
assert dct['age'] == 30
assert len(dct["automobiles"]) == 2
assert dct["automobiles"][0]["brand"] == "Honda"
assert dct["automobiles"][1]["year"] == 2015
# some JSON:
x = '{ "name":"John", "age":30, "city":"New York"}'
# parse x:
y = json.loads(x)
# the result is a Python dictionary:
print(y["age"])
11 changes: 11 additions & 0 deletions docs-new/docs/assets/crd/python-recursive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnTaskDefinition
metadata:
name: scheduled-deployment-2
spec:
python:
parameters:
map:
mydata: "my-other-data"
functionRef:
name: scheduled-deployment-inline
13 changes: 13 additions & 0 deletions docs-new/docs/assets/crd/task-definition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: lifecycle.keptn.sh/v1alpha3
kind: KeptnTaskDefinition
metadata:
name: container-sleep
namespace: podtato-kubectl
spec:
container:
name: testy-test
image: busybox:1.36.1
command:
- 'sh'
- '-c'
- 'sleep 30'
65 changes: 65 additions & 0 deletions docs-new/docs/components/certificate-operator/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Keptn Certificate Manager

## Keptn Cert Manager

The Keptn Cert Manager automatically configures TLS certificates to
[secure communication with the Kubernetes API](https://kubernetes.io/docs/concepts/security/controlling-access/#transport-security).
You can instead
[use cert-manager.io](../../installation/configuration/cert-manager.md)
for this purpose.

Keptn includes a Mutating Webhook
that 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 [keptn-cert-manager](https://github.com/keptn/lifecycle-toolkit/blob/main/keptn-cert-manager/README.md).

How it works:

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

`keptn-cert-manager` is a customized certificate manager
that is installed with Keptn by default.
It is included to simplify installation for new users
and because it is much smaller than most standard certificate managers.
However, Keptn is compatible with most certificate managers
and can be configured to use another certificate manager if you prefer.
See [Use Keptn with cert-manager.io](../../installation/configuration/cert-manager.md)
for instructions.

## Invalid certificate errors

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.

The Keptn cert-manager certificate is stored as a secret in the
`keptn-system` namespace.
To retrieve it:

```shell
kubectl get secrets -n keptn-system
```

This returns something like:

```shell
NAME TYPE DATA AGE
keptn-certs Opaque 5 4d23h
```

Specify the `NAME` of the Keptn certificate (`keptn-certs` in this case)
to delete the Keptn certificate:

```shell
kubectl delete secret keptn-certs -n keptn-system
```
24 changes: 24 additions & 0 deletions docs-new/docs/components/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Components

## Keptn Components

Keptn consists of two main components:

* Keptn Lifecycle Operator, which splits into two separate operators
in Release 0.7.0 and later:
* Lifecycle-Operator
* Metrics-Operator
* Keptn Lifecycle Scheduler

```mermaid
graph TD;
KeptnComponents-->Operators;
KeptnComponents-->Scheduler
Operators-->Lifecycle-Operator
Operators-->Metrics-Operator
style KeptnComponents fill:#006bb8,stroke:#fff,stroke-width:px,color:#fff
style Operators fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8
style Scheduler fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8
style Lifecycle-Operator fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8
style Metrics-Operator fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8
```
Loading

0 comments on commit 7a4239f

Please sign in to comment.