Conversation
wilkers-steve
left a comment
There was a problem hiding this comment.
This is a solid start @renmak. I've left a few comments inline
elasticsearch/Chart.yaml
Outdated
| @@ -0,0 +1,4 @@ | |||
| apiVersion: v1 | |||
| description: A Helm chart for Kubernetes | |||
There was a problem hiding this comment.
We'll want the description to read "A helm chart for elasticsearch", or some variant
| annotations: | ||
| pod.beta.kubernetes.io/init-containers: '[ | ||
| { | ||
| "name": "sysctl", |
There was a problem hiding this comment.
This init container isn't necessary. Elasticsearch has two methods for changing heap size: the first is via the ES_HEAP_SIZE environment variable, and the second is with JVM flags. The example used here (ES_JAVA_OPTS) sets these for the container already. We should look to see what the contents of the elasticsearch configuration file include to provide a method to override the default configuration values through a templated config file in a confmap, or we should make sure the environment variables used in the current approach can be customized through values.yaml
| role: {{ .Values.labels.es_data.role }} | ||
| annotations: | ||
| pod.beta.kubernetes.io/init-containers: '[ | ||
| { |
There was a problem hiding this comment.
See comment regarding heap size wrt this init container
| - name: "CLUSTER_NAME" | ||
| value: "myesdb" | ||
| - name: "NUMBER_OF_MASTERS" | ||
| value: "2" |
There was a problem hiding this comment.
These environment variables should be configurable where it makes sense. For example here, we'd want to make sure NUMBER_OF_MASTERS matches the actual replicas of es-master pods.
| @@ -0,0 +1,16 @@ | |||
| {{/* vim: set filetype=mustache: */}} | |||
There was a problem hiding this comment.
I don't see these two partial templates used anywhere. If they're unnecessary, they should be removed
There was a problem hiding this comment.
Yes will delete this file if no usage found. Keeping it right now just in case if needed.
| # limitations under the License. | ||
|
|
||
| apiVersion: apps/v1beta1 | ||
| kind: StatefulSet |
There was a problem hiding this comment.
I'm not sure we need this to be a StatefulSet. Each of the components should be the same kind (statefulset vs deployment)
| volumeMounts: | ||
| - name: storage | ||
| mountPath: /data | ||
| volumeClaimTemplates: |
There was a problem hiding this comment.
Any manifests for the volume claims should be separate templates
| securityContext: | ||
| privileged: true | ||
| capabilities: | ||
| add: |
There was a problem hiding this comment.
The SYS_RESOURCE capability will need to be added to lock memory appropriately when elasticsearch is set up
| - IPC_LOCK | ||
| - SYS_RESOURCE | ||
| image: {{ .Values.images.elasticsearch }} | ||
| imagePullPolicy: {{ .Values.images.pullPolicy }} |
There was a problem hiding this comment.
The ability to enable resources and template the values for limits and requests should be included, as in the other charts
elasticsearch/values.yaml
Outdated
| cluster_name: myesdb | ||
|
|
||
| images: | ||
| elasticsearch: quay.io/pires/docker-elasticsearch-kubernetes:5.3.0 |
There was a problem hiding this comment.
While this image works currently, we need to determine our reference image. Kolla has been the reference for our OpenStack images, but I don't know how well maintained Elasticsearch is on their end. This matters because Elasticsearch and Kibana's versions are tightly coupled, and we don't want either one to be out of sync with the other.
| # limitations under the License. | ||
|
|
||
| kind: StorageClass | ||
| apiVersion: storage.k8s.io/v1beta1 |
There was a problem hiding this comment.
StorageClass is v1 now
| volumeMounts: | ||
| - name: storage | ||
| mountPath: /data | ||
| volumes: |
There was a problem hiding this comment.
To use an empty directory for storage here, it should be
- name: storage
emptyDir: {}
| - name: storage | ||
| mountPath: /data | ||
| volumes: | ||
| - emptyDir: |
There was a problem hiding this comment.
Similar to above, this approach for using an emptyDir needs to change
| - name: "CLUSTER_NAME" | ||
| value: {{ .Values.cluster_name }} | ||
| - name: "NUMBER_OF_MASTERS" | ||
| value: {{ .Values.replicas.es_master }} #Should we use "" string here or just as number? |
There was a problem hiding this comment.
This inline comment should be removed
24a3d9c to
d7bac99
Compare
|
To reviewer: As of right now we have working version of ES chart. We are using emptyDir for storage. We plan to make further changes in future. |
|
@renmak, Should this be closed as it would likely be destined for github.com/openstack/... at this point? |
@wilkers-steve @v1k0d3n
Elasticsearch helm chart.
Status: Ready for review.