-
Notifications
You must be signed in to change notification settings - Fork 717
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
Normalize Elasticsearch pod related naming #1024
Normalize Elasticsearch pod related naming #1024
Conversation
540d380
to
0d2f7fc
Compare
By default they will get a 1Gi volume, which is chosen because matches roughly 1:1 vs the default heap. Users can opt out of this behavior by specifying the data volume in the Elasticsearch resource directly ```yaml apiVersion: elasticsearch.k8s.elastic.co/v1alpha1 kind: Elasticsearch metadata: name: elasticsearch-sample spec: version: "7.1.0" nodes: - nodeCount: 1 podTemplate: spec: volumes: - name: elasticsearch-data emptyDir: {} ``` Builds on top of elastic#1024 Closes: elastic#913
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about:
- moving from
data
andlogs
toelasticsearch-data
andelasticsearch-logs
. I think they were already self-explanatory in their short version? - the
elastic-internal
prefix. Maybeinternal
is enough?elastic-internal-elasticsearch-config-managed
for example looks a bit hairy, compared to eg.internal-config
. Also most things we mount aremanaged
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing it on Slack with @nkvoll, I'm fine with going with the most explicit naming convention (elasticsearch-*
and elastic-internal-*
).
The new names are defined as consts to provide a slightly better overview.
Adds `-internal` to several things that should be considered internals. Removes some no longer used (and mislabeled) "version specific" resources, such as a generic ConfigMap and Secret. Internal mounts are now mounted to directories under `/mnt/elastic-internal`. Internal users has the `elastic-internal-` prefix and roles has the `elastic_internal_` prefix. Since data and logs directories for ES are not considered internals, they now have the canonical names `elasticsearch-data` and `elasticsearch-logs` (previously just `data` and `logs`) Example Volume Mounts: ``` /mnt/elastic-internal/elasticsearch-config-managed from elastic-internal-elasticsearch-config-managed (ro) /mnt/elastic-internal/keystore-user from elsatic-internal-keystore-user (ro) /mnt/elastic-internal/probe-user from elastic-internal-probe-user (ro) /mnt/elastic-internal/process-manager from elastic-internal-process-manager (rw) /mnt/elastic-internal/secure-settings from elastic-internal-secure-settings (ro) /mnt/elastic-internal/unicast-hosts from elastic-internal-unicast-hosts (ro) /usr/share/elasticsearch/bin from elastic-internal-elasticsearch-bin-local (rw) /usr/share/elasticsearch/config from elastic-internal-elasticsearch-config-local (rw) /usr/share/elasticsearch/config/http-certs from elastic-internal-http-certificates (ro) /usr/share/elasticsearch/config/transport-certs from elastic-internal-transport-certificates (ro) /usr/share/elasticsearch/data from elasticsearch-data (rw) /usr/share/elasticsearch/logs from elasticsearch-logs (rw) /usr/share/elasticsearch/plugins from elastic-internal-elasticsearch-plugins-local (rw) ``` Example Volumes ``` elastic-internal-elasticsearch-config-local: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit: <unset> elastic-internal-elasticsearch-plugins-local: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit: <unset> elastic-internal-elasticsearch-bin-local: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit: <unset> elasticsearch-data: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit: <unset> elasticsearch-logs: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit: <unset> elastic-internal-process-manager: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit: <unset> elastic-internal-unicast-hosts: Type: ConfigMap (a volume populated by a ConfigMap) Name: elasticsearch-sample-es-unicast-hosts Optional: false elastic-internal-probe-user: Type: Secret (a volume populated by a Secret) SecretName: elasticsearch-sample-es-internal-users Optional: false elsatic-internal-keystore-user: Type: Secret (a volume populated by a Secret) SecretName: elasticsearch-sample-es-internal-users Optional: false elastic-internal-secure-settings: Type: Secret (a volume populated by a Secret) SecretName: elasticsearch-sample-es-secure-settings Optional: false elastic-internal-http-certificates: Type: Secret (a volume populated by a Secret) SecretName: elasticsearch-sample-es-http-certs-internal Optional: false elastic-internal-transport-certificates: Type: Secret (a volume populated by a Secret) SecretName: elasticsearch-sample-es-xdcbcdndf4-certs Optional: false elastic-internal-elasticsearch-config-managed: Type: Secret (a volume populated by a Secret) SecretName: elasticsearch-sample-es-xdcbcdndf4-config Optional: false ```
0d2f7fc
to
4c31968
Compare
Fixed the remaining comments, hoping for a happy build from CI since it took the weekend off :) |
Rename secret -roles-users to -xpack-file-realm
This is a bit more descriptive about its actual contents
Normalize volumes, mounts, users and roles for ES
Adds
-internal
to several things that should be considered internals.Removes some no longer used (and mislabeled) "version specific" resources, such
as a generic ConfigMap and Secret.
Internal mounts are now mounted to directories under
/mnt/elastic-internal
.Internal users has the
elastic-internal-
prefix and roles has theelastic_internal_
prefix.Since data and logs directories for ES are not considered internals, they now have the
canonical names
elasticsearch-data
andelasticsearch-logs
(previously justdata
andlogs
)Example Volume Mounts:
Example Volumes
Add an elstic-internal prefix to the init container names.
The new names are defined as consts to provide a slightly better overview.
Closes #547