forked from keptn/lifecycle-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: copy content to new docs engine (keptn#2605)
- Loading branch information
Showing
133 changed files
with
14,174 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -11,6 +11,7 @@ on: | |
- 'epic/*' | ||
paths-ignore: | ||
- "docs/**" | ||
- "docs-new/**" | ||
- "**.md" | ||
- "netlify.toml" | ||
|
||
|
This file contains 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 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,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 |
This file contains 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,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}}'})" |
This file contains 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,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 |
This file contains 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,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" |
This file contains 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,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 |
This file contains 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 @@ | ||
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!") |
This file contains 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,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) |
This file contains 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,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) |
This file contains 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,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"]) |
This file contains 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,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 |
This file contains 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,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' |
This file contains 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,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 | ||
``` |
This file contains 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,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 | ||
``` |
Oops, something went wrong.