Skip to content

Commit

Permalink
Add Kibana extraContainers (#89)
Browse files Browse the repository at this point in the history
* add kibana extraContainers

* added if surrounding the toYaml

* added servicemonitor only including 1 service

* * added servicemonitor only including 1 service
* addded service-name labels to default services

* comment CRD ServiceMonitor values

* * upped chart version
* updated readme

* fix type

---------

Co-authored-by: thr <thr@SAG-CN5Y7Y2.local>
  • Loading branch information
AronKa-SAG and thr authored Jun 14, 2024
1 parent 051b89c commit 9d2fed5
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion 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.3
version: 1.2.4

# 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 Down
9 changes: 6 additions & 3 deletions apigateway/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| `1.2.1` | Added Kibana configuration field 'status.allowAnonymous' set by Values.kibana.allowAnonymousStatus. This removes errors in API Gateway log indicating that Kibana is not available. |
| `1.2.2` | Option in `values.yaml` to create a ServiceMonitor added. |
| `1.2.3` | Job template added to create house keeping (cron) jobs. |
| `1.2.4` | Added Kibana extra container configuration, set by Values.kibana.extraContainers. <br> Added ServiceMonitor matchLabel for a specific service. The service is set by .Values.serviceMonitor.serviceName defaulting to API Gateways runtime service. |

## Values

Expand Down Expand Up @@ -313,6 +314,7 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| kibana.allowAnonymousStatus | bool | `true` | Enable anonymous access to /api/status. |
| kibana.annotations | object | `{}` | Annotations for Kibana |
| kibana.count | int | `1` | |
| kibana.extraContainers | list | `[]` | The definition of extra containers for kibana. |
| kibana.extraInitContainers | list | `[]` | The definition of extra initContainers for kibana. |
| kibana.extraLabels | object | `{}` | Additional labels to be added to kibana pod labels. |
| kibana.image | string | `nil` | The image that should be used. By default ECK will use the official Elasticsearch images. Overwrite this to use an image from an internal registry or any custom images. Make sure that the image corresponds to the version field. |
Expand Down Expand Up @@ -343,10 +345,10 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| metering.logLevel | string | `nil` | The level of log messages that are logged on the console. Valid values are: *error - logs only ERROR messages. *warn (default) - logs ERROR and WARN messages. *info - logs ERROR, WARN, and INFO messages. *debug - logs ERROR, WARN, INFO, and DEBUG messages. Use as a Java system property or an environment variable to see the debug messages of the configuration initialization. |
| metering.proxyAddress | string | `nil` | The proxy address in a <host>:<port> format that the metering client uses. Configure this property only if you use a metering proxy. |
| metering.proxyPass | string | `nil` | The proxy password that the metering client uses. Configure this property only if you use a metering proxy with authentication. Depending on the method that you use to provide a password, ensure that you escape password characters that are specific for the selected method. Valid characters: *Letters: A-Z, a-z *Numbers: 0-9 *Special characters: !@#$%^&*()_+-=[]{}\/?,.<>; |
| metering.proxyType | string | `"DIRECT"` | Тhe type of the proxy that the metering client uses. Valid values are: *DIRECT (default). *HTTP *SOCKS Indicates that the metering client does not use a proxy. |
| metering.proxyType | string | `"DIRECT"` | The type of the proxy that the metering client uses. Valid values are: *DIRECT (default). *HTTP *SOCKS Indicates that the metering client does not use a proxy. |
| metering.reportPeriod | string | `"3600"` | |
| metering.runtimeAlias | string | `nil` | An alias of the webMethods product instance or a group of instances, for which usage data is measured. |
| metering.serverConnectTimeout | string | `"60000"` | Тhe time in milliseconds to establish the initial TCP connection when the metering client calls the server REST endpoint. This is also the time to start the request. |
| metering.serverConnectTimeout | string | `"60000"` | The time in milliseconds to establish the initial TCP connection when the metering client calls the server REST endpoint. This is also the time to start the request. |
| metering.serverReadTimeout | string | `"300000"` | The maximum time in milliseconds without data transfer over the TCP connection to the server. This is also the time that it takes for the server to respond. When this time passes, the request fails. |
| metering.serverUrl | string | `"https://metering.softwareag.cloud/api/measurements"` | The URL of the metering aggregator server REST API. |
| metering.trustStoreFile | string | `nil` | The absolute path to the metering client truststore that is used for HTTPS connections. Add this value in any of the following cases: *If you use the Software AG Metering Server on premises (via HTTPS) and the certificates in the truststore do not match the certificates configured in Software AG Runtime (CTP). *If you use a metering proxy that terminates the SSL connection to the Metering Server in Software AG Cloud. |
Expand Down Expand Up @@ -377,5 +379,6 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| serviceAccount.create | bool | `true` | - apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: {{ include "common.names.roleName" . }} rules: - apiGroups: - "" resources: - pods - endpoints verbs: - get - list - watch |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| serviceAccount.roleName | string | `""` | |
| serviceMonitor | object | `{"enabled":false}` | Create and enable ServiceMonitor. The default is `false`. |
| serviceMonitor.enabled | bool | `false` | Create and enable CRD ServiceMonitor. The default is `false`. |
| serviceMonitor.serviceName | string | `""` | Set the monitored service which is connected by ServiceMonitor. Default (if not set) is the `rt` runtime service. |
| tolerations | list | `[]` | |
1 change: 1 addition & 0 deletions apigateway/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,6 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| `1.2.1` | Added Kibana configuration field 'status.allowAnonymous' set by Values.kibana.allowAnonymousStatus. This removes errors in API Gateway log indicating that Kibana is not available. |
| `1.2.2` | Option in `values.yaml` to create a ServiceMonitor added. |
| `1.2.3` | Job template added to create house keeping (cron) jobs. |
| `1.2.4` | Added Kibana extra container configuration, set by Values.kibana.extraContainers. <br> Added ServiceMonitor matchLabel for a specific service. The service is set by .Values.serviceMonitor.serviceName defaulting to API Gateways runtime service. |

{{ template "chart.valuesSection" . }}
7 changes: 7 additions & 0 deletions apigateway/helm/templates/_helper.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,11 @@ Renders the license config name or secret. If not specified, it will be the defa
*/}}
{{- define "apigateway.licenseconfigname" -}}
{{- default ( printf "%s-%s" (include "common.names.fullname" . ) "license") .Values.licenseConfigName }}
{{- end }}

{{/*
Renders the service name for service monitoring. If not specified, it will be the default name.
*/}}
{{- define "apigateway.monitorServiceName" -}}
{{- default ( printf "%s-%s" (include "common.names.fullname" . ) "-rt") .Values.serviceMonitor.serviceName }}
{{- end }}
5 changes: 4 additions & 1 deletion apigateway/helm/templates/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,7 @@ spec:
mountPath: /usr/share/kibana/config/elasticsearch-certs/truststore.p12
subPath: truststore.p12
readOnly: true
{{- end }}
{{- end }}
{{- if .Values.kibana.extraContainers }}
{{- toYaml .Values.kibana.extraContainers | nindent 8 }}
{{- end }}
3 changes: 3 additions & 0 deletions apigateway/helm/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata:
{{- with .Values.extraLabels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
service-name: {{ include "common.names.fullname" . }}-rt
spec:
type: {{ .Values.service.type }}
ports:
Expand All @@ -48,6 +49,7 @@ metadata:
{{- with .Values.extraLabels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
service-name: {{ include "common.names.fullname" . }}-admin
spec:
type: {{ .Values.service.type }}
ports:
Expand All @@ -70,6 +72,7 @@ metadata:
{{- with .Values.extraLabels -}}
{{ toYaml . | nindent 4 }}
{{- end }}
service-name: {{ include "common.names.fullname" . }}-ui
spec:
type: {{ .Values.service.type }}
sessionAffinity: ClientIP
Expand Down
1 change: 1 addition & 0 deletions apigateway/helm/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ spec:
selector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
service-name: {{ include "apigateway.monitorServiceName" . }}
{{- end }}
11 changes: 8 additions & 3 deletions apigateway/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -439,17 +439,19 @@ prometheus:
## -- Only used on ServiceMonitor
scrapeTimeout: 10s

# -- Create and enable ServiceMonitor. The default is `false`.
serviceMonitor:
# -- Create and enable CRD ServiceMonitor. The default is `false`.
enabled: false
# -- Set the monitored service which is connected by ServiceMonitor. Default (if not set) is the `rt` runtime service.
serviceName: ""

metering:

# -- enable metering
enabled: true
# -- The URL of the metering aggregator server REST API.
serverUrl: "https://metering.softwareag.cloud/api/measurements"
# -- Тhe type of the proxy that the metering client uses.
# -- The type of the proxy that the metering client uses.
# Valid values are:
# *DIRECT (default).
# *HTTP
Expand All @@ -467,7 +469,7 @@ metering:
# *Numbers: 0-9
# *Special characters: !@#$%^&*()_+-=[]{}\/?,.<>;
proxyPass:
# -- Тhe time in milliseconds to establish the initial TCP connection when the metering client calls the server REST endpoint. This is also the time to start the request.
# -- The time in milliseconds to establish the initial TCP connection when the metering client calls the server REST endpoint. This is also the time to start the request.
serverConnectTimeout: "60000"
# -- The maximum time in milliseconds without data transfer over the TCP connection to the server. This is also the time that it takes for the server to respond. When this time passes, the request fails.
serverReadTimeout: "300000"
Expand Down Expand Up @@ -633,6 +635,9 @@ kibana:
# -- The securityContext for kibana container.
securityContext: {}

# -- The definition of extra containers for kibana.
extraContainers: []

# -- The definition of extra initContainers for kibana.
extraInitContainers: []

Expand Down

0 comments on commit 9d2fed5

Please sign in to comment.