mirror of
https://github.com/truenas/charts.git
synced 2026-04-05 03:39:20 +08:00
NAS-121334 / 23.10 / Add ElasticSearch chart to charts (#1078)
* Add elastic-search to charts train * Add read-me * bump common * add description * quote all default string values
This commit is contained in:
2
.github/workflows/charts_tests.yaml
vendored
2
.github/workflows/charts_tests.yaml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@afea100a513515fbd68b0e72a7bb0ae34cb62aec # tag=v2.3.1
|
||||
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # tag=v2.4.0
|
||||
|
||||
- name: Run chart-testing (lint)
|
||||
id: lint
|
||||
|
||||
6
library/ix-dev/charts/elastic-search/Chart.lock
Normal file
6
library/ix-dev/charts/elastic-search/Chart.lock
Normal file
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: file://../../../common
|
||||
version: 1.0.3
|
||||
digest: sha256:1a090020cfa582aff29906320874ffe9b543fcc6c2423c281f434514f2653e02
|
||||
generated: "2023-04-05T18:36:45.107184615+03:00"
|
||||
25
library/ix-dev/charts/elastic-search/Chart.yaml
Normal file
25
library/ix-dev/charts/elastic-search/Chart.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
name: elastic-search
|
||||
description: Elasticsearch is the distributed, RESTful search and analytics engine at the heart of the Elastic Stack.
|
||||
annotations:
|
||||
title: Elastic Search
|
||||
type: application
|
||||
version: 1.0.0
|
||||
apiVersion: v2
|
||||
appVersion: '8.7.0'
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
maintainers:
|
||||
- name: truenas
|
||||
url: https://www.truenas.com/
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: file://../../../common
|
||||
version: 1.0.3
|
||||
home: https://www.elastic.co
|
||||
icon: https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt280217a63b82a734/6202d3378b1f312528798412/elastic-logo.svg
|
||||
sources:
|
||||
- https://www.elastic.co/
|
||||
- https://github.com/truenas/charts/tree/master/charts/elastic-search
|
||||
- https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods
|
||||
keywords:
|
||||
- search
|
||||
- elastic
|
||||
10
library/ix-dev/charts/elastic-search/README.md
Normal file
10
library/ix-dev/charts/elastic-search/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Elastic Search
|
||||
|
||||
> During the installation process, a container will be launched with **root** privileges. This is required
|
||||
> in order to apply the correct permissions to the `Elastic Search` data directory. Afterward, the `Elastic Search` container
|
||||
> will run as a **non**-root user (default `568`).
|
||||
|
||||
If you want to apply additional configuration you can by using additional environment variables.
|
||||
|
||||
See the [Elastic Search documentation](https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods)
|
||||
for more information.
|
||||
10
library/ix-dev/charts/elastic-search/app-readme.md
Normal file
10
library/ix-dev/charts/elastic-search/app-readme.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Elastic Search
|
||||
|
||||
> During the installation process, a container will be launched with **root** privileges. This is required
|
||||
> in order to apply the correct permissions to the `Elastic Search` data directory. Afterward, the `Elastic Search` container
|
||||
> will run as a **non**-root user (default `568`).
|
||||
|
||||
If you want to apply additional configuration you can by using additional environment variables.
|
||||
|
||||
See the [Elastic Search documentation](https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods)
|
||||
for more information.
|
||||
BIN
library/ix-dev/charts/elastic-search/charts/common-1.0.3.tgz
Normal file
BIN
library/ix-dev/charts/elastic-search/charts/common-1.0.3.tgz
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
esStorage:
|
||||
data:
|
||||
type: hostPath
|
||||
hostPath: /mnt/{{ .Release.Name }}/data
|
||||
|
||||
esConfig:
|
||||
password: some-secret
|
||||
nodeName: Elastic Search Basic
|
||||
97
library/ix-dev/charts/elastic-search/ci/https-values.yaml
Normal file
97
library/ix-dev/charts/elastic-search/ci/https-values.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
esStorage:
|
||||
data:
|
||||
type: hostPath
|
||||
hostPath: /mnt/{{ .Release.Name }}/data
|
||||
|
||||
esConfig:
|
||||
password: some-https-secret
|
||||
nodeName: Elastic Search HTTPS
|
||||
|
||||
esNetwork:
|
||||
certificateID: 1
|
||||
|
||||
ixCertificates:
|
||||
"1":
|
||||
certificate: |
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEdjCCA16gAwIBAgIDYFMYMA0GCSqGSIb3DQEBCwUAMGwxDDAKBgNVBAMMA2Fz
|
||||
ZDELMAkGA1UEBhMCVVMxDTALBgNVBAgMBGFzZGYxCzAJBgNVBAcMAmFmMQ0wCwYD
|
||||
VQQKDARhc2RmMQwwCgYDVQQLDANhc2QxFjAUBgkqhkiG9w0BCQEWB2FAYS5jb20w
|
||||
HhcNMjEwODMwMjMyMzU0WhcNMjMxMjAzMjMyMzU0WjBuMQswCQYDVQQDDAJhZDEL
|
||||
MAkGA1UEBhMCVVMxDTALBgNVBAgMBGFzZGYxDTALBgNVBAcMBGFzZGYxDTALBgNV
|
||||
BAoMBGFkc2YxDTALBgNVBAsMBGFzZGYxFjAUBgkqhkiG9w0BCQEWB2FAYS5jb20w
|
||||
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7+1xOHRQyOnQTHFcrdasX
|
||||
Zl0gzutVlA890a1wiQpdD5dOtCLo7+eqVYjqVKo9W8RUIArXWmBu/AbkH7oVFWC1
|
||||
P973W1+ArF5sA70f7BZgqRKJTIisuIFIlRETgfnP2pfQmHRZtGaIJRZI4vQCdYgW
|
||||
2g0KOvvNcZJCVq1OrhKiNiY1bWCp66DGg0ic6OEkZFHTm745zUNQaf2dNgsxKU0H
|
||||
PGjVLJI//yrRFAOSBUqgD4c50krnMF7fU/Fqh+UyOu8t6Y/HsySh3urB+Zie331t
|
||||
AzV6QV39KKxRflNx/yuWrtIEslGTm+xHKoCYJEk/nZ3mX8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XMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEF
|
||||
BQcDAjAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQELBQADggEBAKEocOmVuWlr
|
||||
zegtKYMe8NhHIkFY9oVn5ym6RHNOJpPH4QF8XYC3Z5+iC5yGh4P/jVe/4I4SF6Ql
|
||||
PtofU0jNq5vzapt/y+m008eXqPQFmoUOvu+JavoRVcRx2LIP5AgBA1mF56CSREsX
|
||||
TkuJAA9IUQ8EjnmAoAeKINuPaKxGDuU8BGCMqr/qd564MKNf9XYL+Fb2rlkA0O2d
|
||||
2No34DQLgqSmST/LAvPM7Cbp6knYgnKmGr1nETCXasg1cueHLnWWTvps2HiPp2D/
|
||||
+Fq0uqcZLu4Mdo0CPs4e5sHRyldEnRSKh0DVLprq9zr/GMipmPLJUsT5Jed3sj0w
|
||||
M7Y3vwxshpo=
|
||||
-----END CERTIFICATE-----
|
||||
privatekey: |
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC7+1xOHRQyOnQT
|
||||
HFcrdasXZl0gzutVlA890a1wiQpdD5dOtCLo7+eqVYjqVKo9W8RUIArXWmBu/Abk
|
||||
H7oVFWC1P973W1+ArF5sA70f7BZgqRKJTIisuIFIlRETgfnP2pfQmHRZtGaIJRZI
|
||||
4vQCdYgW2g0KOvvNcZJCVq1OrhKiNiY1bWCp66DGg0ic6OEkZFHTm745zUNQaf2d
|
||||
NgsxKU0HPGjVLJI//yrRFAOSBUqgD4c50krnMF7fU/Fqh+UyOu8t6Y/HsySh3urB
|
||||
+Zie331tAzV6QV39KKxRflNx/yuWrtIEslGTm+xHKoCYJEk/nZ3mX8Y5hG6wWAb7
|
||||
A/FuDVg3AgMBAAECggEAapt30rj9DitGTtxAt13pJMEhyYxvvD3WkvmJwguF/Bbu
|
||||
eW0Ba1c668fMeRCA54FWi1sMqusPS4HUqqUvk+tmyAOsAF4qg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
||||
//L852uyzYhXKw5/fjFGhQ6LbaLgIRFaCZ0L2809u0HFnNvJjHv4AKP6j+vFQYYY
|
||||
qQ+66XnfsA9G/bu4MDS9AX83iahD9IdLXQAy8I19prAbpVumKegPbMnNYNB/TYEc
|
||||
3G15AKCXo7jjOUtHY01DCQ==
|
||||
-----END PRIVATE KEY-----
|
||||
4
library/ix-dev/charts/elastic-search/item.yaml
Normal file
4
library/ix-dev/charts/elastic-search/item.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
icon_url: https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt280217a63b82a734/6202d3378b1f312528798412/elastic-logo.svg
|
||||
categories:
|
||||
- search
|
||||
- elastic
|
||||
176
library/ix-dev/charts/elastic-search/questions.yaml
Normal file
176
library/ix-dev/charts/elastic-search/questions.yaml
Normal file
@@ -0,0 +1,176 @@
|
||||
groups:
|
||||
- name: Elastic Search Configuration
|
||||
description: Configure Elastic Search
|
||||
- name: User and Group Configuration
|
||||
description: Configure User and Group for Elastic Search
|
||||
- name: Network Configuration
|
||||
description: Configure Network for Elastic Search
|
||||
- name: Storage Configuration
|
||||
description: Configure Storage for Elastic Search
|
||||
- name: Resources Configuration
|
||||
description: Configure Resources for Elastic Search
|
||||
|
||||
portals:
|
||||
web_portal:
|
||||
protocols:
|
||||
- "$kubernetes-resource_configmap_portal_protocol"
|
||||
host:
|
||||
- "$kubernetes-resource_configmap_portal_host"
|
||||
ports:
|
||||
- "$kubernetes-resource_configmap_portal_port"
|
||||
path: "$kubernetes-resource_configmap_portal_path"
|
||||
|
||||
questions:
|
||||
|
||||
- variable: esConfig
|
||||
label: ""
|
||||
group: Elastic Search Configuration
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: password
|
||||
label: Password
|
||||
description: The password for the Elastic Search (elastic) user.
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
required: true
|
||||
- variable: nodeName
|
||||
label: Node Name
|
||||
description: The name of the Elastic Search node.
|
||||
schema:
|
||||
type: string
|
||||
default: "elastic_search_node"
|
||||
required: true
|
||||
- variable: heapSize
|
||||
label: Heap Size
|
||||
description: The heap size for Elastic Search.
|
||||
schema:
|
||||
type: string
|
||||
default: "512m"
|
||||
required: true
|
||||
- variable: additionalEnvs
|
||||
label: Additional Environment Variables
|
||||
description: Configure additional environment variables for Elastic Search.
|
||||
schema:
|
||||
type: list
|
||||
default: []
|
||||
items:
|
||||
- variable: env
|
||||
label: Environment Variable
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: name
|
||||
label: Name
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
- variable: value
|
||||
label: Value
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
- variable: esNetwork
|
||||
label: ""
|
||||
group: Network Configuration
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: httpPort
|
||||
label: HTTP Port
|
||||
description: The port for the Elastic Search HTTP
|
||||
schema:
|
||||
type: int
|
||||
default: 30000
|
||||
min: 9000
|
||||
max: 65535
|
||||
required: true
|
||||
- variable: hostNetwork
|
||||
label: Host Network
|
||||
description: |
|
||||
Bind to the host network. It's recommended to keep this disabled.
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
- variable: certificateID
|
||||
label: Certificate
|
||||
description: |
|
||||
The certificate to use for Elastic Search </br>
|
||||
schema:
|
||||
type: int
|
||||
"null": true
|
||||
$ref:
|
||||
- "definitions/certificate"
|
||||
|
||||
- variable: esStorage
|
||||
label: ""
|
||||
group: Storage Configuration
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: data
|
||||
label: Elastic Search Data Storage
|
||||
description: The path to store Elastic Search data.
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: type
|
||||
label: Type
|
||||
description: |
|
||||
ixVolume: Is dataset created automatically by the system.</br>
|
||||
Host Path: Is a path that already exists on the system.
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
default: "ixVolume"
|
||||
enum:
|
||||
- value: "hostPath"
|
||||
description: Host Path (Path that already exists on the system)
|
||||
- value: "ixVolume"
|
||||
description: ixVolume (Dataset created automatically by the system)
|
||||
- variable: datasetName
|
||||
label: Dataset Name
|
||||
schema:
|
||||
type: string
|
||||
show_if: [["type", "=", "ixVolume"]]
|
||||
required: true
|
||||
hidden: true
|
||||
immutable: true
|
||||
default: "data"
|
||||
$ref:
|
||||
- "normalize/ixVolume"
|
||||
- variable: hostPath
|
||||
label: Host Path
|
||||
schema:
|
||||
type: hostpath
|
||||
show_if: [["type", "=", "hostPath"]]
|
||||
immutable: true
|
||||
required: true
|
||||
|
||||
- variable: resources
|
||||
label: ""
|
||||
group: Resources Configuration
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: limits
|
||||
label: Limits
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: cpu
|
||||
label: CPU
|
||||
description: CPU limit for Elastic Search.
|
||||
schema:
|
||||
type: string
|
||||
default: "4000m"
|
||||
required: true
|
||||
- variable: memory
|
||||
label: Memory
|
||||
description: Memory limit for Elastic Search.
|
||||
schema:
|
||||
type: string
|
||||
default: "8Gi"
|
||||
required: true
|
||||
1
library/ix-dev/charts/elastic-search/templates/NOTES.txt
Normal file
1
library/ix-dev/charts/elastic-search/templates/NOTES.txt
Normal file
@@ -0,0 +1 @@
|
||||
{{ include "ix.v1.common.lib.chart.notes" $ }}
|
||||
119
library/ix-dev/charts/elastic-search/templates/_es.tpl
Normal file
119
library/ix-dev/charts/elastic-search/templates/_es.tpl
Normal file
@@ -0,0 +1,119 @@
|
||||
{{- define "es.workload" -}}
|
||||
workload:
|
||||
es:
|
||||
enabled: true
|
||||
primary: true
|
||||
type: Deployment
|
||||
podSpec:
|
||||
hostNetwork: {{ .Values.esNetwork.hostNetwork }}
|
||||
containers:
|
||||
es:
|
||||
enabled: true
|
||||
primary: true
|
||||
imageSelector: image
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.esRunAs.user }}
|
||||
runAsGroup: {{ .Values.esRunAs.group }}
|
||||
readOnlyRootFilesystem: false
|
||||
env:
|
||||
{{/* https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods */}}
|
||||
ES_HEAP_SIZE: {{ .Values.esConfig.heapSize }}
|
||||
ELASTIC_PASSWORD: {{ .Values.esConfig.password }}
|
||||
ES_SETTING_HTTP_PORT: {{ .Values.esNetwork.httpPort }}
|
||||
ES_SETTING_NODE_NAME: {{ .Values.esConfig.nodeName }}
|
||||
ES_SETTING_NODE_ROLES: master
|
||||
ES_SETTING_DISCOVERY_TYPE: single-node
|
||||
ES_SETTING_XPACK_SECURITY_ENABLED: true
|
||||
{{/* Transport is not used on single nodes */}}
|
||||
ES_SETTING_XPACK_SECURITY_TRANSPORT_SSL_ENABLED: false
|
||||
{{ if .Values.esNetwork.certificateID }}
|
||||
ES_SETTING_XPACK_SECURITY_HTTP_SSL_ENABLED: true
|
||||
ES_SETTING_XPACK_SECURITY_HTTP_SSL_KEY: /usr/share/elasticsearch/config/certs/tls.key
|
||||
ES_SETTING_XPACK_SECURITY_HTTP_SSL_CERTIFICATE: /usr/share/elasticsearch/config/certs/tls.crt
|
||||
ES_SETTING_XPACK_SECURITY_HTTP_SSL_CERTIFICATE__AUTHORITIES: /usr/share/elasticsearch/config/certs/ca.crt
|
||||
{{ end }}
|
||||
{{ with .Values.esConfig.additionalEnvs }}
|
||||
{{ range $env := . }}
|
||||
{{ $env.name }}: {{ $env.value }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
type: {{ include "es.schema" . }}
|
||||
path: /_cluster/health?local=true
|
||||
port: {{ .Values.esNetwork.httpPort }}
|
||||
httpHeaders:
|
||||
Authorization: Basic {{ printf "elastic:%s" .Values.esConfig.password | b64enc }}
|
||||
readiness:
|
||||
enabled: true
|
||||
type: {{ include "es.schema" . }}
|
||||
path: /_cluster/health?local=true
|
||||
port: {{ .Values.esNetwork.httpPort }}
|
||||
httpHeaders:
|
||||
Authorization: Basic {{ printf "elastic:%s" .Values.esConfig.password | b64enc }}
|
||||
startup:
|
||||
enabled: true
|
||||
type: {{ include "es.schema" . }}
|
||||
path: /_cluster/health?local=true
|
||||
port: {{ .Values.esNetwork.httpPort }}
|
||||
httpHeaders:
|
||||
Authorization: Basic {{ printf "elastic:%s" .Values.esConfig.password | b64enc }}
|
||||
initContainers:
|
||||
{{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
|
||||
"UID" .Values.esRunAs.user
|
||||
"GID" .Values.esRunAs.group
|
||||
"type" "install") | nindent 8 }}
|
||||
{{/* Service */}}
|
||||
service:
|
||||
es:
|
||||
enabled: true
|
||||
primary: true
|
||||
type: NodePort
|
||||
targetSelector: es
|
||||
ports:
|
||||
http:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: {{ .Values.esNetwork.httpPort }}
|
||||
nodePort: {{ .Values.esNetwork.httpPort }}
|
||||
targetSelector: es
|
||||
|
||||
{{/* Persistence */}}
|
||||
persistence:
|
||||
data:
|
||||
enabled: true
|
||||
type: {{ .Values.esStorage.data.type }}
|
||||
datasetName: {{ .Values.esStorage.data.datasetName | default "" }}
|
||||
hostPath: {{ .Values.esStorage.data.hostPath | default "" }}
|
||||
targetSelector:
|
||||
es:
|
||||
es:
|
||||
mountPath: /usr/share/elasticsearch/data
|
||||
01-permissions:
|
||||
mountPath: /mnt/directories/data
|
||||
{{- if .Values.esNetwork.certificateID }}
|
||||
certs:
|
||||
enabled: true
|
||||
type: secret
|
||||
objectName: es-cert
|
||||
defaultMode: "0600"
|
||||
items:
|
||||
- key: tls.key
|
||||
path: tls.key
|
||||
- key: tls.crt
|
||||
path: tls.crt
|
||||
- key: tls.crt
|
||||
path: ca.crt
|
||||
targetSelector:
|
||||
es:
|
||||
es:
|
||||
mountPath: /usr/share/elasticsearch/config/certs
|
||||
readOnly: true
|
||||
|
||||
scaleCertificate:
|
||||
es-cert:
|
||||
enabled: true
|
||||
id: {{ .Values.esNetwork.certificateID }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,7 @@
|
||||
{{- define "es.schema" -}}
|
||||
{{- $protocol := "http" -}}
|
||||
{{- if .Values.esNetwork.certificateID -}}
|
||||
{{- $protocol = "https" -}}
|
||||
{{- end -}}
|
||||
{{- $protocol -}}
|
||||
{{- end -}}
|
||||
12
library/ix-dev/charts/elastic-search/templates/_portal.tpl
Normal file
12
library/ix-dev/charts/elastic-search/templates/_portal.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- define "es.portal" -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: portal
|
||||
data:
|
||||
path: /
|
||||
port: {{ .Values.esNetwork.httpPort | quote }}
|
||||
protocol: {{ include "es.schema" . }}
|
||||
host: $node_ip
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,9 @@
|
||||
{{- include "ix.v1.common.loader.init" . -}}
|
||||
|
||||
{{/* Merge the templates with Values */}}
|
||||
{{- $_ := mustMergeOverwrite .Values (include "es.workload" $ | fromYaml) -}}
|
||||
|
||||
{{/* Create the configmap for portal manually*/}}
|
||||
{{- include "es.portal" $ -}}
|
||||
|
||||
{{- include "ix.v1.common.loader.apply" . -}}
|
||||
1
library/ix-dev/charts/elastic-search/upgrade_info.json
Normal file
1
library/ix-dev/charts/elastic-search/upgrade_info.json
Normal file
@@ -0,0 +1 @@
|
||||
{"filename": "values.yaml", "keys": ["image"]}
|
||||
26
library/ix-dev/charts/elastic-search/upgrade_strategy
Executable file
26
library/ix-dev/charts/elastic-search/upgrade_strategy
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/python3
|
||||
import json
|
||||
import sys
|
||||
|
||||
from catalog_update.upgrade_strategy import semantic_versioning
|
||||
|
||||
|
||||
def newer_mapping(image_tags):
|
||||
key = list(image_tags.keys())[0]
|
||||
version = semantic_versioning(image_tags[key])
|
||||
if not version:
|
||||
return {}
|
||||
|
||||
return {
|
||||
'tags': {key: f'v{version}'},
|
||||
'app_version': f'v{version}',
|
||||
}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
versions_json = json.loads(sys.stdin.read())
|
||||
except ValueError:
|
||||
raise ValueError('Invalid json specified')
|
||||
|
||||
print(json.dumps(newer_mapping(versions_json)))
|
||||
31
library/ix-dev/charts/elastic-search/values.yaml
Normal file
31
library/ix-dev/charts/elastic-search/values.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
image:
|
||||
repository: docker.elastic.co/elasticsearch/elasticsearch
|
||||
pullPolicy: IfNotPresent
|
||||
tag: '8.7.0'
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 4000m
|
||||
memory: 8Gi
|
||||
|
||||
esConfig:
|
||||
password: ""
|
||||
heapSize: 512m
|
||||
nodeName: elastic_search_node
|
||||
additionalEnvs: []
|
||||
|
||||
# Not user configurable
|
||||
esRunAs:
|
||||
user: 1000
|
||||
group: 1000
|
||||
|
||||
esNetwork:
|
||||
httpPort: 30000
|
||||
hostNetwork: false
|
||||
certificateID: ""
|
||||
|
||||
esStorage:
|
||||
data:
|
||||
type: ixVolume
|
||||
hostPath: ''
|
||||
datasetName: data
|
||||
Reference in New Issue
Block a user