Skip to content

Commit

Permalink
fix: helm chart generation and helm pipeline (keptn#975)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealAnna authored and Thomas Schuetz committed Mar 7, 2023
1 parent 9172bc9 commit 0f5ddbe
Show file tree
Hide file tree
Showing 69 changed files with 123 additions and 916 deletions.
11 changes: 5 additions & 6 deletions .github/actions/deploy-klt-on-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ runs:
echo "Installing KLT using helm"
helm version
helm install -n keptn-lifecycle-toolkit-system --create-namespace toolkit ~/download/artifacts/keptn-lifecycle-toolkit.tgz \
--set keptnScheduler.keptnScheduler.imagePullPolicy=Never \
--set klcControllerManager.manager.imagePullPolicy=Never \
--set metricsOperatorController.manager.imagePullPolicy=Never \
--set klcControllerManager.manager.env.functionRunnerImage=localhost:5000/keptn/functions-runtime:${{ inputs.functions_runtime_tag }} \
--set kltCertManager.manager.imagePullPolicy=Never \
--set fullnameOverride="" \
--set scheduler.scheduler.imagePullPolicy=Never \
--set lifecycleOperator.manager.imagePullPolicy=Never \
--set metricsOperator.manager.imagePullPolicy=Never \
--set lifecycleOperator.manager.env.functionRunnerImage=localhost:5000/keptn/functions-runtime:${{ inputs.functions_runtime_tag }} \
--set certificateOperator.manager.imagePullPolicy=Never \
--debug --wait --timeout 1m
38 changes: 19 additions & 19 deletions helm/chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ checks
| `scheduler.scheduler.containerSecurityContext` | Sets security context | |
| `scheduler.scheduler.env.otelCollectorUrl` | sets url for open telemetry collector | `otel-collector:4317` |
| `scheduler.scheduler.image.repository` | set image repository for scheduler | `ghcr.io/keptn/scheduler` |
| `scheduler.scheduler.image.tag` | set image tag for scheduler | `202303031677839700` |
| `scheduler.scheduler.image.tag` | set image tag for scheduler | `202303061678118281` |
| `scheduler.scheduler.imagePullPolicy` | set image pull policy for scheduler | `Always` |
| `scheduler.scheduler.livenessProbe` | customizable liveness probe for the scheduler | |
| `scheduler.scheduler.readinessProbe` | customizable readiness probe for the scheduler | |
Expand All @@ -26,27 +26,27 @@ checks
| `scheduler.tolerations` | adds tolerations for scheduler | `[]` |
| `scheduler.topologySpreadConstraints` | add topology constraints for scheduler | `[]` |

### Keptn Cert Manager common
### Keptn Certificate Manager common

| Name | Description | Value |
| ---------------------------------------------------------------------------------- | ---------------------------------------------- | ------------------- |
| `certificateOperator.replicas` | customize number of replicas | `1` |
| `certificateOperator.nodeSelector` | specify custom node selectors for cert manager | `{}` |
| `certificateOperator.tolerations` | customize tolerations for cert manager | `[]` |
| `certificateOperator.topologySpreadConstraints` | add topology constraints for cert manager | `[]` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.health.healthProbeBindAddress` | TODO TODO TODO | `:8081` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.leaderElection.leaderElect` | TODO TODO TODO | `true` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.leaderElection.resourceName` | TODO TODO TODO | `6b866dd9.keptn.sh` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.metrics.bindAddress` | TODO TODO TODO | `127.0.0.1:8080` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.webhook.port` | TODO TODO TODO | `9443` |
| Name | Description | Value |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------- | ------------------- |
| `certificateOperator.replicas` | customize number of replicas | `1` |
| `certificateOperator.nodeSelector` | specify custom node selectors for cert manager | `{}` |
| `certificateOperator.tolerations` | customize tolerations for cert manager | `[]` |
| `certificateOperator.topologySpreadConstraints` | add topology constraints for cert manager | `[]` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.health.healthProbeBindAddress` | TODO TODO TODO | `:8081` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.leaderElection.leaderElect` | TODO TODO TODO | `true` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.leaderElection.resourceName` | TODO TODO TODO | `6b866dd9.keptn.sh` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.metrics.bindAddress` | TODO TODO TODO | `127.0.0.1:8080` |
| `lifecycleManagerConfig.controllerManagerConfigYaml.webhook.port` | setup port for the lifecycle operator admission webhook | `9443` |

### Keptn Cert Manager controller
### Keptn Certificate Manager controller

| Name | Description | Value |
| ------------------------------------------------------ | ------------------------------------------------ | ------------------------------------ |
| `certificateOperator.manager.containerSecurityContext` | Sets security context for the cert manager | |
| `certificateOperator.manager.image.repository` | specify repo for manager image | `ghcr.io/keptn/certificate-operator` |
| `certificateOperator.manager.image.tag` | select tag for manager container | `202303031677839700` |
| `certificateOperator.manager.image.tag` | select tag for manager container | `202303061678118281` |
| `certificateOperator.manager.imagePullPolicy` | select image pull policy for manager container | `Always` |
| `certificateOperator.manager.livenessProbe` | custom RBAC proxy liveness probe | |
| `certificateOperator.manager.readinessProbe` | custom manager readiness probe | |
Expand Down Expand Up @@ -85,10 +85,10 @@ checks
| `lifecycleOperator.manager.env.keptnWorkloadControllerLogLevel` | sets the log level of Keptn Workload Controller | `0` |
| `lifecycleOperator.manager.env.keptnWorkloadInstanceControllerLogLevel` | sets the log level of Keptn WorkloadInstance Controller | `0` |
| `lifecycleOperator.manager.env.optionsControllerLogLevel` | sets the log level of Keptn Options Controller | `0` |
| `lifecycleOperator.manager.env.otelCollectorUrl` | Sets the URL for the open telemetry collector | `0` |
| `lifecycleOperator.manager.env.otelCollectorUrl` | Sets the URL for the open telemetry collector | `otel-collector:4317` |
| `lifecycleOperator.manager.env.functionRunnerImage` | specify image for task runtime | `ghcr.keptn.sh/keptn/functions-runtime:v0.6.0` |
| `lifecycleOperator.manager.image.repository` | specify registry for manager image | `ghcr.io/keptn/lifecycle-operator` |
| `lifecycleOperator.manager.image.tag` | select tag for manager image | `202303031677839700` |
| `lifecycleOperator.manager.image.tag` | select tag for manager image | `202303061678118281` |
| `lifecycleOperator.manager.imagePullPolicy` | specify pull policy for manager image | `Always` |
| `lifecycleOperator.manager.livenessProbe` | custom livenessprobe for manager container | |
| `lifecycleOperator.manager.readinessProbe` | custom readinessprobe for manager container | |
Expand All @@ -107,7 +107,7 @@ checks
| `metricsOperatorService.ports[1].port` | | `443` |
| `metricsOperatorService.ports[1].targetPort` | | `custom-metrics` |
| `metricsOperatorService.ports[2].name` | | `metrics` |
| `metricsOperatorService.ports[2].port` | | `2222` |
| `metricsOperatorService.ports[2].port` | | `9999` |
| `metricsOperatorService.ports[2].protocol` | | `TCP` |
| `metricsOperatorService.ports[2].targetPort` | | `metrics` |
| `metricsOperatorService.type` | | `ClusterIP` |
Expand All @@ -132,7 +132,7 @@ checks
| `metricsOperator.manager.containerSecurityContext.allowPrivilegeEscalation` | | `false` |
| `metricsOperator.manager.containerSecurityContext.capabilities.drop` | | `["ALL"]` |
| `metricsOperator.manager.image.repository` | specify registry for manager image | `ghcr.io/keptn/metrics-operator` |
| `metricsOperator.manager.image.tag` | select tag for manager image | `202303031677839700` |
| `metricsOperator.manager.image.tag` | select tag for manager image | `202303061678118281` |
| `metricsOperator.manager.env.exposeKeptnMetrics` | enable metrics exporter | `true` |
| `metricsOperator.manager.env.metricsControllerLogLevel` | sets the log level of Metrics Controller | `0` |
| `metricsOperator.manager.livenessProbe` | custom livenessprobe for manager container | |
Expand Down
6 changes: 3 additions & 3 deletions helm/chart/doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
## @param scheduler.tolerations adds tolerations for scheduler
## @param scheduler.topologySpreadConstraints add topology constraints for scheduler

## @section Keptn Cert Manager common
## @section Keptn Certificate Operator common

## @param certificateOperator.replicas customize number of replicas

Expand All @@ -52,10 +52,10 @@
## @param lifecycleManagerConfig.controllerManagerConfigYaml.leaderElection.leaderElect TODO TODO TODO
## @param lifecycleManagerConfig.controllerManagerConfigYaml.leaderElection.resourceName TODO TODO TODO
## @param lifecycleManagerConfig.controllerManagerConfigYaml.metrics.bindAddress TODO TODO TODO
## @param lifecycleManagerConfig.controllerManagerConfigYaml.webhook.port TODO TODO TODO
## @param lifecycleManagerConfig.controllerManagerConfigYaml.webhook.port setup port for the lifecycle operator admission webhook


## @section Keptn Cert Manager controller
## @section Keptn Certificate Operator controller
## @extra certificateOperator.manager.containerSecurityContext Sets security context for the cert manager
## @skip certificateOperator.manager.containerSecurityContext.allowPrivilegeEscalation
## @skip certificateOperator.manager.containerSecurityContext.capabilities.drop
Expand Down
12 changes: 6 additions & 6 deletions helm/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ certificateOperator:
type: RuntimeDefault
image:
repository: ghcr.io/keptn/certificate-operator
tag: "202303031677839700"
tag: "202303061678118281"
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -73,10 +73,10 @@ lifecycleOperator:
keptnWorkloadControllerLogLevel: "0"
keptnWorkloadInstanceControllerLogLevel: "0"
optionsControllerLogLevel: "0"
otelCollectorUrl: "0"
otelCollectorUrl: otel-collector:4317
image:
repository: ghcr.io/keptn/lifecycle-operator
tag: "202303031677839700"
tag: "202303061678118281"
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -130,7 +130,7 @@ metricsOperator:
metricsControllerLogLevel: "0"
image:
repository: ghcr.io/keptn/metrics-operator
tag: "202303031677839700"
tag: "202303061678118281"
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -164,7 +164,7 @@ metricsOperatorService:
port: 443
targetPort: custom-metrics
- name: metrics
port: 2222
port: 9999
protocol: TCP
targetPort: metrics
type: ClusterIP
Expand Down Expand Up @@ -193,7 +193,7 @@ scheduler:
otelCollectorUrl: otel-collector:4317
image:
repository: ghcr.io/keptn/scheduler
tag: "202303031677839700"
tag: "202303061678118281"
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down
3 changes: 2 additions & 1 deletion helm/overlay/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# import the default deployment as the base
bases:
resources:
- ../../operator/config/default
- ../../klt-cert-manager/config/default
- ../../metrics-operator/config/default
Expand All @@ -22,3 +22,4 @@ patches:
target:
kind: MutatingWebhookConfiguration
name: "(mutating-webhook-configuration)"
2 changes: 1 addition & 1 deletion klt-cert-manager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ help: ## Display this help.

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=operator-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=certificate-operator-role crd paths="./..." output:crd:artifacts:config=config/crd/bases

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down
2 changes: 1 addition & 1 deletion klt-cert-manager/config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace: keptn-lifecycle-toolkit-system
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: certificate-
#namePrefix: certificate-

# Labels to add to all resources and selectors.
#commonLabels:
Expand Down
2 changes: 1 addition & 1 deletion klt-cert-manager/config/default/manager_config_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: operator
name: certificate-operator
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion klt-cert-manager/config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: ghcr.io/keptn/certificate-operator
newTag: latest
newTag: "202303061678117798"
2 changes: 1 addition & 1 deletion klt-cert-manager/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: operator
name: certificate-operator
namespace: system
labels:
control-plane: certificate-operator
Expand Down
6 changes: 3 additions & 3 deletions klt-cert-manager/config/rbac/extra_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ metadata:
app.kubernetes.io/created-by: certificate-operator
app.kubernetes.io/part-of: certificate-operator
app.kubernetes.io/managed-by: kustomize
name: operator-role-binding
name: certificate-operator-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: operator-role
name: certificate-operator-role
subjects:
- kind: ServiceAccount
name: operator
name: certificate-operator
namespace: system
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ metadata:
app.kubernetes.io/created-by: certificate-operator
app.kubernetes.io/part-of: certificate-operator
app.kubernetes.io/managed-by: kustomize
name: operator-leader-election-rolebinding
name: certificate-operator-leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: leader-election-role
subjects:
- kind: ServiceAccount
name: operator
name: certificate-operator
namespace: system
4 changes: 2 additions & 2 deletions klt-cert-manager/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: operator-role
name: certificate-operator-role
rules:
- apiGroups:
- admissionregistration.k8s.io
Expand Down Expand Up @@ -48,7 +48,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: operator-role
name: certificate-operator-role
namespace: keptn-lifecycle-toolkit-system
rules:
- apiGroups:
Expand Down
6 changes: 3 additions & 3 deletions klt-cert-manager/config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ metadata:
app.kubernetes.io/created-by: certificate-operator
app.kubernetes.io/part-of: certificate-operator
app.kubernetes.io/managed-by: kustomize
name: operator-rolebinding
name: certificate-operator-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: operator-role
name: certificate-operator-role
subjects:
- kind: ServiceAccount
name: operator
name: certificate-operator
namespace: system
2 changes: 1 addition & 1 deletion klt-cert-manager/config/rbac/service_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
app.kubernetes.io/created-by: certificate-operator
app.kubernetes.io/part-of: certificate-operator
app.kubernetes.io/managed-by: kustomize
name: operator
name: certificate-operator
namespace: system
2 changes: 1 addition & 1 deletion metrics-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ help: ## Display this help.

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=operator-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=metrics-operator-role crd paths="./..." output:crd:artifacts:config=config/crd/bases

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down
Loading

0 comments on commit 0f5ddbe

Please sign in to comment.