Skip to content

Commit

Permalink
Merge pull request #118 from cospeedster/patch-2
Browse files Browse the repository at this point in the history
chore(deps)!: Bump version of prometheus-elasticsearch-exporter to 6.5.0
  • Loading branch information
thomas-2020 authored Nov 28, 2024
2 parents c894ff2 + 001cd67 commit 527d70d
Show file tree
Hide file tree
Showing 23 changed files with 201 additions and 165 deletions.
6 changes: 3 additions & 3 deletions apigateway/helm/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 1.0.3
- name: prometheus-elasticsearch-exporter
repository: https://prometheus-community.github.io/helm-charts
version: 5.0.0
digest: sha256:ca4d38e54226ff732696e5af73cb2ed423acece567769328f72d07fd38e6c15c
generated: "2024-06-25T14:25:11.045085+02:00"
version: 6.5.0
digest: sha256:b09f538632326fa846608cca98435da9b12ab19393f782b95e43f330753ac04d
generated: "2024-11-08T09:28:49.886783483+01:00"
4 changes: 2 additions & 2 deletions apigateway/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.2.9
version: 2.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -50,5 +50,5 @@ dependencies:
repository: "https://prometheus-community.github.io/helm-charts"
tags:
- prometheus-elasticsearch-exporter
version: 5.0.0
version: 6.5.0
condition: prometheus-elasticsearch-exporter.enabled
22 changes: 20 additions & 2 deletions apigateway/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,12 @@ spec:
sessionAffinityConfig:
clientIP:
timeoutSeconds: 1000
---
# apigateway-ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
annotations:
nginx.ingress.kubernetes.io/affinity: "cookie"
```

Expand Down Expand Up @@ -170,6 +169,25 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| `1.2.7` | Added possibility to rename roleBinding for API Gateway, Kibana and Elasticsearch. This allows for multiple deployments into the same namespace. Also, CRD ServiceMonitor selector corrected. Support of ES storage PVC annotations. |
| `1.2.8` | `tpl` function support in `affinity` value added. `affinity` support added for Kibana and Elasticsearch. `topologySpreadConstraints` support added for APIGW, Elasticsearch and Kibana. |
| `1.2.9` | `priorityClassName` support added for APIGW, Elasticsearch and Kibana. |
| `2.0.0` | Prometheus Elasticsearch Exporter version `6.5.0` is used. Value `revisionHistoryLimit` is added and documented. |

## Chart Version `2.0.0`

The Chart version `2.0.0` uses the [Prometheus Elasticsearch Exporter](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-elasticsearch-exporter) version `6.5.0`.

### Migrate from `1.x.x` to `2.0.0`

If you want to migrate the Elasticsearch Exporter version `5.0.0`, you must delete the existing deployment. Over install is not working. You see the error ...

```
Error: UPGRADE FAILED: cannot patch "apigw-prometheus-elasticsearch-exporter" ...
```

To delete the Elasticsearch Exporter deployment ...

```
kubectl delete deployment <Helm-release-name>-prometheus-elasticsearch-exporter -n <namespace>
```

## Values

Expand Down
25 changes: 21 additions & 4 deletions apigateway/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,16 @@ spec:
sessionAffinityConfig:
clientIP:
timeoutSeconds: 1000

---
# apigateway-ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
annotations:
nginx.ingress.kubernetes.io/affinity: "cookie"
```

Note, if you are using the default configuration and nginx as your ingress controller, sticky sessions will be enabled by default for the UI port and ingress. Change the ingress annotations accordingly for other ingress controllers like Traefik.

Note, if you are using the default configuration and nginx as your ingress controller, sticky sessions will be enabled by default for the UI port and ingress. Change the ingress annotations accordingly for other ingress controllers like Traefik.

## Using an external load balancer

Expand Down Expand Up @@ -171,5 +169,24 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| `1.2.7` | Added possibility to rename roleBinding for API Gateway, Kibana and Elasticsearch. This allows for multiple deployments into the same namespace. Also, CRD ServiceMonitor selector corrected. Support of ES storage PVC annotations. |
| `1.2.8` | `tpl` function support in `affinity` value added. `affinity` support added for Kibana and Elasticsearch. `topologySpreadConstraints` support added for APIGW, Elasticsearch and Kibana. |
| `1.2.9` | `priorityClassName` support added for APIGW, Elasticsearch and Kibana. |
| `2.0.0` | Prometheus Elasticsearch Exporter version `6.5.0` is used. Value `revisionHistoryLimit` is added and documented. |

## Chart Version `2.0.0`

The Chart version `2.0.0` uses the [Prometheus Elasticsearch Exporter](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-elasticsearch-exporter) version `6.5.0`.

### Migrate from `1.x.x` to `2.0.0`

If you want to migrate the Elasticsearch Exporter version `5.0.0`, you must delete the existing deployment. Over install is not working. You see the error ...

```
Error: UPGRADE FAILED: cannot patch "apigw-prometheus-elasticsearch-exporter" ...
```

To delete the Elasticsearch Exporter deployment ...

```
kubectl delete deployment <Helm-release-name>-prometheus-elasticsearch-exporter -n <namespace>
```

{{ template "chart.valuesSection" . }}
Binary file modified apigateway/helm/charts/common-1.0.3.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions apigateway/helm/templates/_helper.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,27 @@ Build the secret name for truststore for Elasticsearch
{{- end }}

{{/*
Renders API Gateway's password key identifier for API Gateway for the keystore. Defaults to "password" if no Value for .Values.apigw.elastic.
Renders API Gateway's password key identifier for API Gateway for the keystore. Defaults to "password" if no Value for .Values.apigw.elastic.
*/}}
{{- define "apigateway.elastickeystoresecretPasswordKey" -}}
{{- default ( printf "%s" "password" ) .Values.apigw.elastickeyStorePassKey }}
{{- end }}
{{/*
Renders API Gateway's password key identifier for API Gateway for the truststore. Defaults to "password" if no Value for .Values.apigw.elastic.
Renders API Gateway's password key identifier for API Gateway for the truststore. Defaults to "password" if no Value for .Values.apigw.elastic.
*/}}
{{- define "apigateway.elastictruststoresecretPasswordKey" -}}
{{- default ( printf "%s" "password" ) .Values.apigw.elastictruststoreStorePassKey }}
{{- end }}

{{/*
{{/*
Build the tls secret name, which holds the jks trust and keystore for API Gateway to communicate with Elasticsearch
*/}}
{{- define "apigateway.elastictls" -}}
{{- default (printf "%s%s" (include "common.names.fullname" .) "-es-tls-secret") .Values.elasticsearch.tlsSecretName }}
{{- end }}

{{/*
{{/*
Build the admin secret name, which holds the Administrator password
*/}}
{{- define "apigateway.adminsecret" -}}
Expand Down
6 changes: 2 additions & 4 deletions apigateway/helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,18 @@ data:
{{- if .Values.apigw.extraConfigSources }}
{{- toYaml .Values.apigw.extraConfigSources | nindent 4 -}}
{{- end }}
apigw-config.yml: |
apigw:
apigw:
{{- range $key, $value := .Values.apigw.configSources }}
{{- if kindIs "map" $value }}
{{- printf "%s:" $key | nindent 6 }}
{{- include "common.utils.renderNestedMap" (dict "map" $value "ctx" $ "depth" 8) }}
{{- else if kindIs "string" $value }}
{{- printf "%s: %s" $key (tpl $value $) }}
{{- else if or (kindIs "bool" $value) (or (kindIs "float" $value) (kindIs "int" $value)) }}
{{- printf "%s: %v" $key $value }}
{{- printf "%s: %v" $key $value }}
{{- end }}
{{- end }}
{{ if .Values.apigw.applicationProperties -}}
application.properties: |
{{- printf "%s" (tpl .Values.apigw.applicationProperties .) | nindent 4 }}
Expand Down
4 changes: 2 additions & 2 deletions apigateway/helm/templates/configmaps-extra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ metadata:
{{- with $.Values.extraLabels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
data:
{{- toYaml .data | nindent 2 }}
data:
{{- toYaml .data | nindent 2 }}
{{- end }}
24 changes: 12 additions & 12 deletions apigateway/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,20 @@ spec:
{{- end }}
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ include "common.names.serviceAccountName" . }}
{{- end }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if or ( .Values.apigw.initContainer.enabled ) ( .Values.extraInitContainers ) }}
initContainers:
{{- if .Values.elasticsearch.deploy }}
{{- if .Values.elasticsearch.deploy }}
- name: waitforelasticsearch
image: {{ .Values.global.curlImage }}
imagePullPolicy: IfNotPresent
{{- if .Values.resources.apigwInitContainer }}
{{- if .Values.resources.apigwInitContainer }}
resources:
{{- toYaml .Values.resources.apigwInitContainer | nindent 12 }}
{{- end }}
{{- if .Values.apigw.initContainer.securityContext }}
{{- if .Values.apigw.initContainer.securityContext }}
securityContext:
{{- toYaml .Values.apigw.initContainer.securityContext | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -148,7 +148,7 @@ spec:
valueFrom:
secretKeyRef:
name: {{ include "apigateway.elastickeystoresecret" . }}
key: {{ include "apigateway.elastickeystoresecretPasswordKey" . }}
key: {{ include "apigateway.elastickeystoresecretPasswordKey" . }}
- name: apigw_elasticsearch_https_truststorePassword
valueFrom:
secretKeyRef:
Expand All @@ -171,7 +171,7 @@ spec:
- containerPort: {{ int .Values.apigw.adminPort }}
name: admin-http
protocol: TCP
- containerPort: {{ int .Values.apigw.runtimeExternalPort }}
- containerPort: {{ int .Values.apigw.runtimeExternalPort }}
name: external-http
protocol: TCP
{{- if .Values.grpcService.enabled }}
Expand All @@ -181,7 +181,7 @@ spec:
{{- end }}
{{- if .Values.extraPorts }}
{{- toYaml .Values.extraPorts | nindent 10 }}
{{- end }}
{{- end }}
livenessProbe:
tcpSocket:
port: {{ int .Values.apigw.adminPort }}
Expand All @@ -194,7 +194,7 @@ spec:
httpGet:
path: /rest/apigateway/health
port: {{ int .Values.apigw.adminPort }}
scheme: {{ .Values.apigw.readinessProbe.scheme }}
scheme: {{ .Values.apigw.readinessProbe.scheme }}
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 30
Expand All @@ -219,7 +219,7 @@ spec:
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- if eq "string" (printf "%T" .Values.extraVolumeMounts) }}
{{- tpl .Values.extraVolumeMounts . | nindent 12 }}
{{- tpl .Values.extraVolumeMounts . | nindent 12 }}
{{- else }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
Expand All @@ -245,7 +245,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.hostAliases }}
hostAliases:
hostAliases:
{{- toYaml .Values.hostAliases | nindent 8 }}
{{- end }}
volumes:
Expand All @@ -258,7 +258,7 @@ spec:
- key: apigw-config.yml
path: apigw-config.yml
- key: application.properties
path: application.properties
path: application.properties
- name: apigw-license
configMap:
name: {{ include "apigateway.licenseconfigname" . }}
Expand All @@ -268,7 +268,7 @@ spec:
path: licenseKey.xml
{{- if .Values.elasticsearch.tlsEnabled }}
- name: elastic-tls
secret:
secret:
secretName: {{ include "apigateway.elastictls" .}}
items:
- key: truststore.jks
Expand Down
14 changes: 7 additions & 7 deletions apigateway/helm/templates/elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
labels:
{{- with .Values.extraLabels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
version: {{ .Values.elasticsearch.version }}
{{- if .Values.elasticsearch.image }}
Expand All @@ -35,7 +35,7 @@ spec:
http:
tls:
{{- if .Values.elasticsearch.tlsEnabled }}
certificate:
certificate:
secretName: {{ tpl .Values.elasticsearch.certificateSecretName . }}
selfSignedCertificate:
{{- if .Values.elasticsearch.subjectAltNames }}
Expand Down Expand Up @@ -88,9 +88,9 @@ spec:
{{- if not .Values.elasticsearch.defaultNodeSet.memoryMapping }}
node.store.allow_mmap: false
{{- end }}
podTemplate:
podTemplate:
metadata:
labels:
labels:
{{- with .Values.extraLabels -}}
{{ toYaml . | nindent 12 }}
{{- end }}
Expand All @@ -99,8 +99,8 @@ spec:
{{ toYaml . | nindent 12 }}
{{- end }}
spec:
{{- with .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
{{- with .Values.elasticsearch.affinity }}
affinity:
Expand Down Expand Up @@ -144,7 +144,7 @@ spec:
memory: 50Mi
cpu: 500m
limits:
memory: 100Mi
memory: 100Mi
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion apigateway/helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ metadata:
{{- $labels | nindent 4 }}
{{- with $.Values.extraLabels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- with .annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion apigateway/helm/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}

{{ end }}

{{- end -}}
4 changes: 2 additions & 2 deletions apigateway/helm/templates/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
name: {{ include "common.names.fullname" . }}
podTemplate:
metadata:
labels:
labels:
{{- with .Values.extraLabels -}}
{{ toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -147,7 +147,7 @@ spec:
name: {{ include "apigateway.kibanasecret" . }}
key: password
{{- if .Values.kibana.tls.enabled }}
- name: KIBANA_TRUSTSTORE_PASSWORD
- name: KIBANA_TRUSTSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "apigateway.kibanatruststorepassword" . }}
Expand Down
6 changes: 3 additions & 3 deletions apigateway/helm/templates/license.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-license
labels:
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- with .Values.extraLabels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- end }}
annotations:
helm.sh/resource-policy: keep
helm.sh/resource-policy: keep
data:
licensekey:
{{ .Values.license | toYaml | nindent 4 }}
Expand Down
Loading

0 comments on commit 527d70d

Please sign in to comment.