-
Notifications
You must be signed in to change notification settings - Fork 17
Add helm module #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add helm module #25
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # | ||
|
|
||
| apiVersion: v2 | ||
| name: iotdb-cluster | ||
| description: The distribution of Apache IoTDB | ||
|
|
||
| # A chart can be either an 'application' or a 'library' chart. | ||
| # | ||
| # Application charts are a collection of templates that can be packaged into versioned archives | ||
| # to be deployed. | ||
| # | ||
| # Library charts provide useful utilities or functions for the chart developer. They're included as | ||
| # a dependency of application charts to inject those utilities and functions into the rendering | ||
| # pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
| 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.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 | ||
| # follow Semantic Versioning. They should reflect the version the application is using. | ||
| # It is recommended to use it with quotes. | ||
| appVersion: "1.16.0" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| This is Apache IoTDB Distribution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| {{/* | ||
2b3c511 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| */}} | ||
|
|
||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "iotdb-cluster.name" -}} | ||
| {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create a default fully qualified app name. | ||
| We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
| If release name contains chart name it will be used as a full name. | ||
| */}} | ||
| {{- define "iotdb-cluster.fullname" -}} | ||
| {{- if .Values.fullnameOverride }} | ||
| {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- $name := default .Chart.Name .Values.nameOverride }} | ||
| {{- if contains $name .Release.Name }} | ||
| {{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create chart name and version as used by the chart label. | ||
| */}} | ||
| {{- define "iotdb-cluster.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "iotdb-cluster.labels" -}} | ||
| helm.sh/chart: {{ include "iotdb-cluster.chart" . }} | ||
| {{ include "iotdb-cluster.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "iotdb-cluster.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "iotdb-cluster.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "iotdb-cluster.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "iotdb-cluster.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # | ||
|
|
||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: {{ .Values.confignode.name }}-cm | ||
| namespace: {{ .Release.Namespace }} | ||
| data: | ||
| iotdb-system.properties: | | ||
| cn_internal_address=<HOSTNAME>.{{ .Values.confignode.name }}-svc.{{ .Release.Namespace }} | ||
| cn_seed_config_node={{ .Values.confignode.name }}-0.{{ .Values.confignode.name }}-svc.{{ .Release.Namespace }}:10710 | ||
| config_node_consensus_protocol_class={{ .Values.confignode.configNodeConsensusProtocolClass }} | ||
| schema_replication_factor={{ .Values.confignode.schemaReplicationFactor }} | ||
| schema_region_consensus_protocol_class={{ .Values.confignode.schemaRegionConsensusProtocolClass }} | ||
| data_replication_factor={{ .Values.confignode.dataReplicationFactor }} | ||
| data_region_consensus_protocol_class={{ .Values.confignode.dataRegionConsensusProtocolClass }} | ||
| enable_last_cache={{ .Values.confignode.enableLastCache }} | ||
| data_region_group_extension_policy={{ .Values.confignode.dataRegionGroupExtensionPolicy }} | ||
| default_data_region_group_num_per_database={{ .Values.confignode.dataRegionGroupNumPerDatabase }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # | ||
|
|
||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ .Values.confignode.name }}-svc | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app: {{ .Values.confignode.name }} | ||
| spec: | ||
| type: NodePort | ||
| ports: | ||
| - port: 80 | ||
| targetPort: 80 | ||
| name: rpc | ||
| selector: | ||
| app: {{ .Values.confignode.name }} | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| name: {{ .Values.confignode.name }} | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: {{ .Values.confignode.name }} | ||
| serviceName: {{ .Values.confignode.name }}-svc | ||
| replicas: {{ .Values.confignode.nodeCount }} | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: {{ .Values.confignode.name }} | ||
| spec: | ||
| terminationGracePeriodSeconds: 10 | ||
| initContainers: | ||
| - name: init-confignode | ||
| image: busybox | ||
| command: [ 'sh', '-c', 'mkdir -p /iotdb/ && touch /iotdb/.env' ] | ||
| volumeMounts: | ||
| - name: map-confignode | ||
| mountPath: /iotdb | ||
| containers: | ||
| - name: confignode | ||
| image: {{ printf "%s:%s" .Values.image.repository .Values.image.tag }} | ||
| command: ["/bin/bash", "-c", "/iotdb/sbin/entrypoint.sh confignode"] | ||
| envFrom: | ||
| - configMapRef: | ||
| name: {{ .Values.confignode.name }}-cm | ||
| env: | ||
| - name: POD_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.name | ||
| - name: cn_internal_address | ||
| value: "$(POD_NAME).{{ .Values.confignode.name }}-svc.{{ .Release.Namespace }}" | ||
| ports: | ||
| - containerPort: 80 | ||
| name: web | ||
| - containerPort: 10710 | ||
| name: internal | ||
| - containerPort: 10720 | ||
| name: consensus | ||
| volumeMounts: | ||
| - name: map-confignode | ||
| mountPath: /iotdb/data | ||
| subPath: data | ||
| - name: map-confignode | ||
| mountPath: /iotdb/ext | ||
| subPath: ext | ||
| - name: map-confignode | ||
| mountPath: /iotdb/logs | ||
| subPath: logs | ||
| - name: map-confignode | ||
| mountPath: /iotdb/.env | ||
| subPath: .env | ||
| resources: | ||
| requests: | ||
| cpu: {{ .Values.confignode.resources.requests.cpu }} | ||
| memory: {{ .Values.confignode.resources.requests.memory }} | ||
| volumeClaimTemplates: | ||
| - metadata: | ||
| name: map-confignode | ||
| spec: | ||
| accessModes: [ "ReadWriteOnce" ] | ||
| storageClassName: {{ .Values.storage.className }} | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.confignode.storageCapacity }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # | ||
|
|
||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: {{ .Values.datanode.name }}-cm | ||
| namespace: {{ .Release.Namespace }} | ||
| data: | ||
| iotdb-system.properties: | | ||
| dn_rpc_address=<HOSTNAME>.{{ .Values.datanode.name }}-svc.{{ .Release.Namespace }} | ||
| dn_internal_address=<HOSTNAME>.{{ .Values.datanode.name }}-svc.{{ .Release.Namespace }} | ||
| dn_seed_config_node={{ .Values.confignode.name }}-0.{{ .Values.confignode.name }}-svc.{{ .Release.Namespace }}:10710 | ||
| enable_rest_service={{ .Values.datanode.enableRestService }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.