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 <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

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

Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* Update helm-service/chart/README.md

Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

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

Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

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

Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* Update on PR review

Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* fix tipo in chart

Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* refactor(installer): due to review

Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* fix tipo in chart statistics-service

Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* chore(installer): update readme and quote

Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* chore(installer): tipo in func description

Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* Update .github/workflows/integration_tests.yml

Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>

Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* Update installer/airgapped/install_keptn.sh

Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* fix: integrationtests

Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* Update .github/workflows/integration_tests.yml

Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Sarah Huber <sarah.huber@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* fix: integration test and airgapped script

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* fix: zd pipeline

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

fix: zd pipeline

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

fix: zd pipeline

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

fix: zd pipeline

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

* chore: removed duplicat

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Co-authored-by: RealAnna <anna.reale@dynatrace.com>
  • Loading branch information
3 people authored Jul 11, 2022
1 parent c93552d commit 68e2b71
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 43 deletions.
60 changes: 31 additions & 29 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,37 @@ Helm Chart for the keptn jmeter-service

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

| Parameter | Description | Default |
|-----------------------------------------|--------------------------------------------------------------|------------------------------------|
| `nameOverride` | Override the name label and distributor subscription name | `""` |
| `jmeterservice.image.repository` | Container image name | `"docker.io/keptn/jmeter-service"` |
| `jmeterservice.image.pullPolicy` | Kubernetes image pull policy | `"IfNotPresent"` |
| `jmeterservice.image.tag` | Container tag | `""` |
| `jmeterservice.service.enabled` | Creates a kubernetes service for the jmeter-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 registry name. Will be set at all services. | `"docker.io/keptn/"` |
| `global.keptn.tag` | Container tag. Will be set at all services. | `""` |
| `jmeterservice.image.registry` | Container image name | ``"${global.keptn.image.registry}/jmeter-service"` |
| `jmeterservice.image.pullPolicy` | Kubernetes image pull policy | `"IfNotPresent"` |
| `jmeterservice.image.tag` | Container tag | `global.keptn.image.tag` |
| `jmeterservice.service.enabled` | Creates a kubernetes service for the jmeter-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}/keptn/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
6 changes: 3 additions & 3 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
{{- if .Values.image }}
image: {{ .Values.image }} # use image from .Values.image (e.g., when starting via skaffold)
{{- else }}
image: "{{ .Values.jmeterservice.image.repository }}:{{ .Values.jmeterservice.image.tag | default .Chart.AppVersion }}"
image: {{ include "keptn.common.images.image" ( dict "imageRoot" .Values.jmeterservice.image "global" .Values.global.keptn "defaultTag" .Chart.AppVersion) | quote }}
{{- end }}
imagePullPolicy: {{ .Values.jmeterservice.image.pullPolicy }}
ports:
Expand All @@ -59,7 +59,7 @@ spec:
resources:
{{- toYaml .Values.jmeterservice.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 "jmeter-service.prestop" . | nindent 10 }}
livenessProbe:
httpGet:
Expand Down Expand Up @@ -90,7 +90,7 @@ spec:
- name: SERVICE_FILTER
value: "{{ .Values.distributor.serviceFilter }}"
- 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: VERSION
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": {
"repository": {
"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
17 changes: 12 additions & 5 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
global:
keptn: # This values will be automatically templated to all keptn services
registry: docker.io/keptn # Registry where the image is located.
tag: "" # Container Tag globally for all keptn services

nameOverride:

jmeterservice:
image:
repository: docker.io/keptn/jmeter-service # Container Image Name
pullPolicy: IfNotPresent # Kubernetes Image Pull Policy
tag: "" # Container Tag
registry: "" # Container Registry
repository: "jmeter-service" # Container Image Name
tag: "" # Container Tag
pullPolicy: IfNotPresent # Kubernetes Image Pull Policy
service:
enabled: true # Creates a Kubernetes Service for the jmeter-service
gracePeriod: 60
Expand All @@ -26,9 +32,10 @@ distributor:
serviceFilter: "" # Sets the service this helm service belongs to
projectFilter: "" # Sets the project this helm service belongs to
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 68e2b71

Please sign in to comment.