This repository has been archived by the owner on Mar 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve local helm dependencies (#778)
- Loading branch information
Showing
47 changed files
with
2,322 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
51 changes: 51 additions & 0 deletions
51
integration/unfork/elastic-stack/expected/.ship/state.json
Large diffs are not rendered by default.
Oops, something went wrong.
93 changes: 93 additions & 0 deletions
93
.../unfork/elastic-stack/expected/base/charts/elasticsearch/templates/client-deployment.yaml
This file contains 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,93 @@ | ||
--- | ||
# Source: elastic-stack/charts/elasticsearch/templates/client-deployment.yaml | ||
apiVersion: apps/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: elasticsearch | ||
chart: elasticsearch-1.15.3 | ||
component: "client" | ||
heritage: Tiller | ||
release: elastic-stack | ||
name: elastic-stack-elasticsearch-client | ||
spec: | ||
replicas: 2 | ||
template: | ||
metadata: | ||
labels: | ||
app: elasticsearch | ||
component: "client" | ||
release: elastic-stack | ||
spec: | ||
serviceAccountName: elastic-stack-elasticsearch-client | ||
securityContext: | ||
fsGroup: 1000 | ||
affinity: | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- weight: 1 | ||
podAffinityTerm: | ||
topologyKey: kubernetes.io/hostname | ||
labelSelector: | ||
matchLabels: | ||
app: "elasticsearch" | ||
release: "elastic-stack" | ||
component: "client" | ||
initContainers: | ||
# see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html | ||
# and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall | ||
- name: "sysctl" | ||
image: "busybox:latest" | ||
imagePullPolicy: "Always" | ||
command: ["sysctl", "-w", "vm.max_map_count=262144"] | ||
securityContext: | ||
privileged: true | ||
containers: | ||
- name: elasticsearch | ||
env: | ||
- name: NODE_DATA | ||
value: "false" | ||
- name: NODE_MASTER | ||
value: "false" | ||
- name: DISCOVERY_SERVICE | ||
value: elastic-stack-elasticsearch-discovery | ||
- name: PROCESSORS | ||
valueFrom: | ||
resourceFieldRef: | ||
resource: limits.cpu | ||
- name: ES_JAVA_OPTS | ||
value: "-Djava.net.preferIPv4Stack=true -Xms512m -Xmx512m " | ||
- name: MINIMUM_MASTER_NODES | ||
value: "2" | ||
resources: | ||
limits: | ||
cpu: "1" | ||
requests: | ||
cpu: 25m | ||
memory: 512Mi | ||
|
||
readinessProbe: | ||
httpGet: | ||
path: /_cluster/health | ||
port: 9200 | ||
initialDelaySeconds: 5 | ||
livenessProbe: | ||
httpGet: | ||
path: /_cluster/health?local=true | ||
port: 9200 | ||
initialDelaySeconds: 90 | ||
image: "docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.4" | ||
imagePullPolicy: "IfNotPresent" | ||
ports: | ||
- containerPort: 9200 | ||
name: http | ||
- containerPort: 9300 | ||
name: transport | ||
volumeMounts: | ||
- mountPath: /usr/share/elasticsearch/config/elasticsearch.yml | ||
name: config | ||
subPath: elasticsearch.yml | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: elastic-stack-elasticsearch |
13 changes: 13 additions & 0 deletions
13
...ork/elastic-stack/expected/base/charts/elasticsearch/templates/client-serviceaccount.yaml
This file contains 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,13 @@ | ||
--- | ||
# Source: elastic-stack/charts/elasticsearch/templates/client-serviceaccount.yaml | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app: elasticsearch | ||
chart: elasticsearch-1.15.3 | ||
component: "client" | ||
heritage: Tiller | ||
release: elastic-stack | ||
name: elastic-stack-elasticsearch-client |
24 changes: 24 additions & 0 deletions
24
...gration/unfork/elastic-stack/expected/base/charts/elasticsearch/templates/client-svc.yaml
This file contains 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,24 @@ | ||
--- | ||
# Source: elastic-stack/charts/elasticsearch/templates/client-svc.yaml | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: elasticsearch | ||
chart: elasticsearch-1.15.3 | ||
component: "client" | ||
heritage: Tiller | ||
release: elastic-stack | ||
name: elastic-stack-elasticsearch-client | ||
|
||
spec: | ||
ports: | ||
- name: http | ||
port: 9200 | ||
targetPort: http | ||
selector: | ||
app: elasticsearch | ||
component: "client" | ||
release: elastic-stack | ||
type: ClusterIP | ||
|
84 changes: 84 additions & 0 deletions
84
integration/unfork/elastic-stack/expected/base/charts/elasticsearch/templates/configmap.yaml
This file contains 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,84 @@ | ||
--- | ||
# Source: elastic-stack/charts/elasticsearch/templates/configmap.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: elastic-stack-elasticsearch | ||
labels: | ||
app: elastic-stack-elasticsearch | ||
chart: "elasticsearch-1.15.3" | ||
release: "elastic-stack" | ||
heritage: "Tiller" | ||
data: | ||
elasticsearch.yml: |- | ||
cluster.name: elasticsearch | ||
node.data: ${NODE_DATA:true} | ||
node.master: ${NODE_MASTER:true} | ||
node.ingest: ${NODE_INGEST:true} | ||
node.name: ${HOSTNAME} | ||
network.host: 0.0.0.0 | ||
# see https://github.com/kubernetes/kubernetes/issues/3595 | ||
bootstrap.memory_lock: ${BOOTSTRAP_MEMORY_LOCK:false} | ||
discovery: | ||
zen: | ||
ping.unicast.hosts: ${DISCOVERY_SERVICE:} | ||
minimum_master_nodes: ${MINIMUM_MASTER_NODES:2} | ||
# see https://github.com/elastic/elasticsearch-definitive-guide/pull/679 | ||
processors: ${PROCESSORS:} | ||
# avoid split-brain w/ a minimum consensus of two masters plus a data node | ||
gateway.expected_master_nodes: ${EXPECTED_MASTER_NODES:2} | ||
gateway.expected_data_nodes: ${EXPECTED_DATA_NODES:1} | ||
gateway.recover_after_time: ${RECOVER_AFTER_TIME:5m} | ||
gateway.recover_after_master_nodes: ${RECOVER_AFTER_MASTER_NODES:2} | ||
gateway.recover_after_data_nodes: ${RECOVER_AFTER_DATA_NODES:1} | ||
log4j2.properties: |- | ||
status = error | ||
appender.console.type = Console | ||
appender.console.name = console | ||
appender.console.layout.type = PatternLayout | ||
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n | ||
rootLogger.level = info | ||
rootLogger.appenderRef.console.ref = console | ||
logger.searchguard.name = com.floragunn | ||
logger.searchguard.level = info | ||
pre-stop-hook.sh: |- | ||
#!/bin/bash | ||
exec &> >(tee -a "/var/log/elasticsearch-hooks.log") | ||
NODE_NAME=${HOSTNAME} | ||
echo "Prepare to migrate data of the node ${NODE_NAME}" | ||
echo "Move all data from node ${NODE_NAME}" | ||
curl -s -XPUT -H 'Content-Type: application/json' 'elastic-stack-elasticsearch-client:9200/_cluster/settings' -d "{ | ||
\"transient\" :{ | ||
\"cluster.routing.allocation.exclude._name\" : \"${NODE_NAME}\" | ||
} | ||
}" | ||
echo "" | ||
while true ; do | ||
echo -e "Wait for node ${NODE_NAME} to become empty" | ||
SHARDS_ALLOCATION=$(curl -s -XGET 'http://elastic-stack-elasticsearch-client:9200/_cat/shards') | ||
if ! echo "${SHARDS_ALLOCATION}" | grep -E "${NODE_NAME}"; then | ||
break | ||
fi | ||
sleep 1 | ||
done | ||
echo "Node ${NODE_NAME} is ready to shutdown" | ||
post-start-hook.sh: |- | ||
#!/bin/bash | ||
exec &> >(tee -a "/var/log/elasticsearch-hooks.log") | ||
NODE_NAME=${HOSTNAME} | ||
CLUSTER_SETTINGS=$(curl -s -XGET "http://elastic-stack-elasticsearch-client:9200/_cluster/settings") | ||
if echo "${CLUSTER_SETTINGS}" | grep -E "${NODE_NAME}"; then | ||
echo "Activate node ${NODE_NAME}" | ||
curl -s -XPUT -H 'Content-Type: application/json' "http://elastic-stack-elasticsearch-client:9200/_cluster/settings" -d "{ | ||
\"transient\" :{ | ||
\"cluster.routing.allocation.exclude._name\" : null | ||
} | ||
}" | ||
fi | ||
echo "Node ${NODE_NAME} is ready to be used" |
13 changes: 13 additions & 0 deletions
13
...nfork/elastic-stack/expected/base/charts/elasticsearch/templates/data-serviceaccount.yaml
This file contains 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,13 @@ | ||
--- | ||
# Source: elastic-stack/charts/elasticsearch/templates/data-serviceaccount.yaml | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app: elasticsearch | ||
chart: elasticsearch-1.15.3 | ||
component: "data" | ||
heritage: Tiller | ||
release: elastic-stack | ||
name: elastic-stack-elasticsearch-data |
127 changes: 127 additions & 0 deletions
127
...n/unfork/elastic-stack/expected/base/charts/elasticsearch/templates/data-statefulset.yaml
This file contains 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,127 @@ | ||
--- | ||
# Source: elastic-stack/charts/elasticsearch/templates/data-statefulset.yaml | ||
apiVersion: apps/v1beta1 | ||
kind: StatefulSet | ||
metadata: | ||
labels: | ||
app: elasticsearch | ||
chart: elasticsearch-1.15.3 | ||
component: "data" | ||
heritage: Tiller | ||
release: elastic-stack | ||
name: elastic-stack-elasticsearch-data | ||
spec: | ||
serviceName: elastic-stack-elasticsearch-data | ||
replicas: 2 | ||
template: | ||
metadata: | ||
labels: | ||
app: elasticsearch | ||
component: "data" | ||
release: elastic-stack | ||
role: data | ||
spec: | ||
serviceAccountName: elastic-stack-elasticsearch-data | ||
securityContext: | ||
fsGroup: 1000 | ||
affinity: | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- weight: 1 | ||
podAffinityTerm: | ||
topologyKey: kubernetes.io/hostname | ||
labelSelector: | ||
matchLabels: | ||
app: "elasticsearch" | ||
release: "elastic-stack" | ||
component: "data" | ||
initContainers: | ||
# see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html | ||
# and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall | ||
- name: "sysctl" | ||
image: "busybox:latest" | ||
imagePullPolicy: "Always" | ||
command: ["sysctl", "-w", "vm.max_map_count=262144"] | ||
securityContext: | ||
privileged: true | ||
- name: "chown" | ||
image: "docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.4" | ||
imagePullPolicy: "IfNotPresent" | ||
command: | ||
- /bin/bash | ||
- -c | ||
- chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data && | ||
chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/logs | ||
securityContext: | ||
runAsUser: 0 | ||
volumeMounts: | ||
- mountPath: /usr/share/elasticsearch/data | ||
name: data | ||
containers: | ||
- name: elasticsearch | ||
env: | ||
- name: DISCOVERY_SERVICE | ||
value: elastic-stack-elasticsearch-discovery | ||
- name: NODE_MASTER | ||
value: "false" | ||
- name: PROCESSORS | ||
valueFrom: | ||
resourceFieldRef: | ||
resource: limits.cpu | ||
- name: ES_JAVA_OPTS | ||
value: "-Djava.net.preferIPv4Stack=true -Xms1536m -Xmx1536m " | ||
- name: MINIMUM_MASTER_NODES | ||
value: "2" | ||
image: "docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.4" | ||
imagePullPolicy: "IfNotPresent" | ||
ports: | ||
- containerPort: 9300 | ||
name: transport | ||
|
||
resources: | ||
limits: | ||
cpu: "1" | ||
requests: | ||
cpu: 25m | ||
memory: 1536Mi | ||
|
||
readinessProbe: | ||
httpGet: | ||
path: /_cluster/health?local=true | ||
port: 9200 | ||
initialDelaySeconds: 5 | ||
volumeMounts: | ||
- mountPath: /usr/share/elasticsearch/data | ||
name: data | ||
- mountPath: /usr/share/elasticsearch/config/elasticsearch.yml | ||
name: config | ||
subPath: elasticsearch.yml | ||
- name: config | ||
mountPath: /pre-stop-hook.sh | ||
subPath: pre-stop-hook.sh | ||
- name: config | ||
mountPath: /post-start-hook.sh | ||
subPath: post-start-hook.sh | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: ["/bin/bash","/pre-stop-hook.sh"] | ||
postStart: | ||
exec: | ||
command: ["/bin/bash","/post-start-hook.sh"] | ||
terminationGracePeriodSeconds: 3600 | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: elastic-stack-elasticsearch | ||
updateStrategy: | ||
type: OnDelete | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: data | ||
spec: | ||
accessModes: | ||
- "ReadWriteOnce" | ||
resources: | ||
requests: | ||
storage: "30Gi" |
13 changes: 13 additions & 0 deletions
13
...ork/elastic-stack/expected/base/charts/elasticsearch/templates/master-serviceaccount.yaml
This file contains 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,13 @@ | ||
--- | ||
# Source: elastic-stack/charts/elasticsearch/templates/master-serviceaccount.yaml | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app: elasticsearch | ||
chart: elasticsearch-1.15.3 | ||
component: "master" | ||
heritage: Tiller | ||
release: elastic-stack | ||
name: elastic-stack-elasticsearch-master |
Oops, something went wrong.