Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
feat(installer): Add options for setting image repository and tag glo…
Browse files Browse the repository at this point in the history
…bally (#8152)

* feat(installer): refactor images + helm-service + jemeter-service

Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* Update installer/manifests/keptn/templates/_helpers.tpl

Co-authored-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* Update helm-service/chart/README.md

Co-authored-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* Update jmeter-service/chart/templates/deployment.yaml

Co-authored-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* Update helm-service/chart/templates/deployment.yaml

Co-authored-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* Update on PR review

Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* fix tipo in chart

Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* refactor(installer): due to review

Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* fix tipo in chart statistics-service

Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* chore(installer): update readme and quote

Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* chore(installer): tipo in func description

Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* Update .github/workflows/integration_tests.yml

Signed-off-by: Sarah Huber <[email protected]>

Co-authored-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* Update installer/airgapped/install_keptn.sh

Co-authored-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* fix: integrationtests

Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* Update .github/workflows/integration_tests.yml

Co-authored-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Sarah Huber <[email protected]>
Signed-off-by: RealAnna <[email protected]>

* fix: integration test and airgapped script

Signed-off-by: RealAnna <[email protected]>

* fix: zd pipeline

Signed-off-by: RealAnna <[email protected]>

fix: zd pipeline

Signed-off-by: RealAnna <[email protected]>

fix: zd pipeline

Signed-off-by: RealAnna <[email protected]>

fix: zd pipeline

Signed-off-by: RealAnna <[email protected]>

* chore: removed duplicat

Signed-off-by: RealAnna <[email protected]>

Co-authored-by: Moritz Wiesinger <[email protected]>
Co-authored-by: RealAnna <[email protected]>
  • Loading branch information
3 people authored Jul 11, 2022
1 parent 3d8f8bd commit deeec1d
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 45 deletions.
60 changes: 31 additions & 29 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,37 @@ Helm Chart for the keptn helm-service

The following table lists the configurable parameters of the Helm-service chart and their default values.

| Parameter | Description | Default |
|-----------------------------------------|--------------------------------------------------------------|----------------------------------|
| `nameOverride` | Override the name label and distributor subscription name | `""` |
| `helmservice.image.repository` | Container image name | `"docker.io/keptn/helm-service"` |
| `helmservice.image.pullPolicy` | Kubernetes image pull policy | `"IfNotPresent"` |
| `helmservice.image.tag` | Container tag | `""` |
| `helmservice.service.enabled` | Creates a kubernetes service for the helm-service | `true` |
| `distributor.stageFilter` | Sets the stage this helm service belongs to | `""` |
| `distributor.serviceFilter` | Sets the service this helm service belongs to | `""` |
| `distributor.projectFilter` | Sets the project this helm service belongs to | `""` |
| `distributor.image.repository` | Container image name | `"docker.io/keptn/distributor"` |
| `distributor.image.pullPolicy` | Kubernetes image pull policy | `"IfNotPresent"` |
| `distributor.image.tag` | Container tag | `""` |
| `remoteControlPlane.enabled` | Enables remote execution plane mode | `false` |
| `remoteControlPlane.api.protocol` | Used protocol (http, https | `"https"` |
| `remoteControlPlane.api.hostname` | Hostname of the control plane cluster (and port) | `""` |
| `remoteControlPlane.api.apiValidateTls` | Defines if the control plane certificate should be validated | `true` |
| `remoteControlPlane.api.token` | Keptn api token | `""` |
| `imagePullSecrets` | Secrets to use for container registry credentials | `[]` |
| `serviceAccount.create` | Enables the service account creation | `true` |
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `serviceAccount.name` | The name of the service account to use. | `""` |
| `podAnnotations` | Annotations to add to the created pods | `{}` |
| `podSecurityContext` | Set the pod security context (e.g. fsgroups) | `{}` |
| `securityContext` | Set the security context (e.g. runasuser) | `{}` |
| `resources` | Resource limits and requests | `{}` |
| `nodeSelector` | Node selector configuration | `{}` |
| `tolerations` | Tolerations for the pods | `[]` |
| `affinity` | Affinity rules | `{}` |
| Parameter | Description | Default |
|-----------------------------------------|-------------------------------------------------------------------|-------------------------------------------------|
| `nameOverride` | Override the name label and distributor subscription name | `""` |
| `global.keptn.registry` | Container repository/registry name. Will be set for all services. | `"docker.io/keptn/"` |
| `global.keptn.tag` | Container tag. Will be set for all services. | `""` |
| `helmservice.image.registry` | Container image name | `"${global.keptn.image.registry}/helm-service"` |
| `helmservice.image.pullPolicy` | Kubernetes image pull policy | `"IfNotPresent"` |
| `helmservice.image.tag` | Container tag | `global.keptn.image.tag` |
| `helmservice.service.enabled` | Creates a kubernetes service for the helm-service | `true` |
| `distributor.stageFilter` | Sets the stage this helm service belongs to | `""` |
| `distributor.serviceFilter` | Sets the service this helm service belongs to | `""` |
| `distributor.projectFilter` | Sets the project this helm service belongs to | `""` |
| `distributor.image.registry` | Container image name | `"${global.keptn.image.registry}/distributor"` |
| `distributor.image.pullPolicy` | Kubernetes image pull policy | `"IfNotPresent"` |
| `distributor.image.tag` | Container tag | `global.keptn.image.tag` |
| `remoteControlPlane.enabled` | Enables remote execution plane mode | `false` |
| `remoteControlPlane.api.protocol` | Used protocol (http, https | `"https"` |
| `remoteControlPlane.api.hostname` | Hostname of the control plane cluster (and port) | `""` |
| `remoteControlPlane.api.apiValidateTls` | Defines if the control plane certificate should be validated | `true` |
| `remoteControlPlane.api.token` | Keptn api token | `""` |
| `imagePullSecrets` | Secrets to use for container registry credentials | `[]` |
| `serviceAccount.create` | Enables the service account creation | `true` |
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `serviceAccount.name` | The name of the service account to use. | `""` |
| `podAnnotations` | Annotations to add to the created pods | `{}` |
| `podSecurityContext` | Set the pod security context (e.g. fsgroups) | `{}` |
| `securityContext` | Set the security context (e.g. runasuser) | `{}` |
| `resources` | Resource limits and requests | `{}` |
| `nodeSelector` | Node selector configuration | `{}` |
| `tolerations` | Tolerations for the pods | `[]` |
| `affinity` | Affinity rules | `{}` |



Expand Down
10 changes: 3 additions & 7 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ spec:
- name: helm-service
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- if .Values.image }}
image: {{ .Values.image }} # use image from .Values.image (e.g., when starting via skaffold)
{{- else }}
image: "{{ .Values.helmservice.image.repository }}:{{ .Values.helmservice.image.tag | default .Chart.AppVersion }}"
{{ end }}
image: {{ include "keptn.common.images.image" ( dict "imageRoot" .Values.helmservice.image "global" .Values.global.keptn "defaultTag" .Chart.AppVersion) | quote }}
imagePullPolicy: {{ .Values.helmservice.image.pullPolicy }}
ports:
- containerPort: 80
Expand Down Expand Up @@ -93,7 +89,7 @@ spec:
resources:
{{- toYaml .Values.helmservice.resources | nindent 12 }}
- name: distributor
image: "{{ .Values.distributor.image.repository }}:{{ .Values.distributor.image.tag | default .Chart.AppVersion }}"
image: {{ include "keptn.common.images.image" ( dict "imageRoot" .Values.distributor.image "global" .Values.global.keptn "defaultTag" .Chart.AppVersion) | quote }}
{{- include "helm-service.prestop" . | nindent 10 }}
livenessProbe:
httpGet:
Expand Down Expand Up @@ -128,7 +124,7 @@ spec:
fieldRef:
fieldPath: metadata.labels['app.kubernetes.io/version']
- name: DISTRIBUTOR_VERSION
value: {{ .Values.distributor.image.tag | default .Chart.AppVersion }}
value: {{ include "keptn.common.images.tag" ( dict "imageRoot" .Values.distributor.image "global" .Values.global.keptn "defaultTag" .Chart.AppVersion) | quote }}
- name: LOCATION
valueFrom:
fieldRef:
Expand Down
17 changes: 11 additions & 6 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"properties": {
"global": {
"properties": {
"keptn": {
"properties": {
"registry": {
"pattern": "^([a-z0-9][a-z0-9-.]{2,63})(:[0-9]+)?([a-z0-9-_./]{1,128})$"
}
}
}
}
},
"remoteControlPlane": {
"type": "object",
"required": [
Expand Down Expand Up @@ -76,9 +87,6 @@
"properties": {
"image": {
"properties": {
"repository": {
"pattern": "^([a-z0-9][a-z0-9-.]{2,63})(:[0-9]+)?([a-z0-9-_./]{1,128})$"
},
"pullPolicy": {
"enum": [
"IfNotPresent",
Expand All @@ -104,9 +112,6 @@
"properties": {
"image": {
"properties": {
"repository": {
"pattern": "^([a-z0-9][a-z0-9-.]{2,63})(:[0-9]+)?([a-z0-9-./]{1,128})$"
},
"pullPolicy": {
"enum": [
"IfNotPresent",
Expand Down
13 changes: 10 additions & 3 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
global:
keptn: # This values will be automatically templated to all keptn services
registry: docker.io/keptn # Registry/Repository where the image is located. The Image Name will be templated automatically. Example: <this-property>/distributor
tag: ""

nameOverride:

helmservice:
image:
repository: docker.io/keptn/helm-service # Container Image Name
registry: "" # Container Registry
repository: "helm-service" # Container Image Name
pullPolicy: IfNotPresent # Kubernetes Image Pull Policy
tag: "" # Container Tag
service:
Expand All @@ -22,9 +28,10 @@ distributor:
serviceFilter: "" # Service to which this helm service belongs; default=all; comma-separated list to filter for set of services
projectFilter: "" # Project to which this helm service belongs; default=all; comma-separated list to filter for set of projects
image:
repository: docker.io/keptn/distributor # Container Image Name
pullPolicy: IfNotPresent # Kubernetes Image Pull Policy
registry: "" # Container Registry
repository: "distributor" # Container Image Name
tag: "" # Container Tag
pullPolicy: IfNotPresent # Kubernetes Image Pull Policy
config:
queueGroup:
enabled: true # Enable connection via Nats queue group to support exactly-once message processing
Expand Down

0 comments on commit deeec1d

Please sign in to comment.