Merge "Revert "Remove Kibana indices before pod start up""
This commit is contained in:
commit
1bb3e1b2ed
@ -15,7 +15,7 @@ apiVersion: v1
|
|||||||
appVersion: v7.1.0
|
appVersion: v7.1.0
|
||||||
description: OpenStack-Helm Kibana
|
description: OpenStack-Helm Kibana
|
||||||
name: kibana
|
name: kibana
|
||||||
version: 0.1.8
|
version: 0.1.9
|
||||||
home: https://www.elastic.co/products/kibana
|
home: https://www.elastic.co/products/kibana
|
||||||
sources:
|
sources:
|
||||||
- https://github.com/elastic/kibana
|
- https://github.com/elastic/kibana
|
||||||
|
@ -14,23 +14,6 @@ limitations under the License.
|
|||||||
*/}}
|
*/}}
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
{{- if .Values.manifests.wait_for_kibana_pods_readiness }}
|
|
||||||
echo "Waiting for all Kibana pods to become Ready"
|
|
||||||
count=1
|
|
||||||
# Wait up to 30 minutes for all Kibana pods to become Ready. This does not necessarily mean
|
|
||||||
# Kibana pods will take up to 30 minutes to come up. This script will wait up to 30 minutes
|
|
||||||
# instead of going into an infinite loop to wait. This timed out value should be reduced once
|
|
||||||
# Kibana startup is enhanced.
|
|
||||||
while [[ $(kubectl get pods -n {{ .Release.Namespace }} -l application=kibana,component=dashboard -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') =~ "False" ]]; do
|
|
||||||
sleep 30
|
|
||||||
if [[ $count -eq 60 ]]; then
|
|
||||||
echo "Timed out waiting for all Kibana pods to become Ready, proceed to create index patterns."
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
((count++))
|
|
||||||
done
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- range $objectType, $indices := .Values.conf.create_kibana_indexes.indexes }}
|
{{- range $objectType, $indices := .Values.conf.create_kibana_indexes.indexes }}
|
||||||
{{- range $indices }}
|
{{- range $indices }}
|
||||||
curl -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \
|
curl -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \
|
||||||
|
@ -17,10 +17,6 @@ set -e
|
|||||||
COMMAND="${@:-start}"
|
COMMAND="${@:-start}"
|
||||||
|
|
||||||
function start () {
|
function start () {
|
||||||
|
|
||||||
curl --cacert /etc/elasticsearch/certs/ca.crt -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \
|
|
||||||
-XDELETE "${ELASTICSEARCH_HOSTS}/.kibana*"
|
|
||||||
|
|
||||||
exec /usr/share/kibana/bin/kibana \
|
exec /usr/share/kibana/bin/kibana \
|
||||||
--elasticsearch.hosts="${ELASTICSEARCH_HOSTS}" \
|
--elasticsearch.hosts="${ELASTICSEARCH_HOSTS}" \
|
||||||
--elasticsearch.username="${ELASTICSEARCH_USERNAME}" \
|
--elasticsearch.username="${ELASTICSEARCH_USERNAME}" \
|
||||||
|
@ -24,9 +24,6 @@ metadata:
|
|||||||
name: register-kibana-indexes
|
name: register-kibana-indexes
|
||||||
labels:
|
labels:
|
||||||
{{ tuple $envAll "kibana" "register_kibana_indexes" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
{{ tuple $envAll "kibana" "register_kibana_indexes" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": post-install,post-upgrade
|
|
||||||
"helm.sh/hook-delete-policy": before-hook-creation
|
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
@ -86,30 +83,4 @@ spec:
|
|||||||
configMap:
|
configMap:
|
||||||
name: kibana-bin
|
name: kibana-bin
|
||||||
defaultMode: 0755
|
defaultMode: 0755
|
||||||
---
|
|
||||||
kind: ClusterRole
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
metadata:
|
|
||||||
name: {{ $serviceAccountName }}
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- ''
|
|
||||||
resources:
|
|
||||||
- pods
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: {{ $serviceAccountName }}
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: {{ $serviceAccountName }}
|
|
||||||
namespace: {{ $envAll.Release.Namespace }}
|
|
||||||
roleRef:
|
|
||||||
kind: ClusterRole
|
|
||||||
name: {{ $serviceAccountName }}
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -26,6 +26,7 @@ images:
|
|||||||
dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0
|
dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0
|
||||||
image_repo_sync: docker.io/library/docker:17.07.0
|
image_repo_sync: docker.io/library/docker:17.07.0
|
||||||
register_kibana_indexes: docker.io/openstackhelm/heat:newton-ubuntu_xenial
|
register_kibana_indexes: docker.io/openstackhelm/heat:newton-ubuntu_xenial
|
||||||
|
flush_kibana_metadata: docker.io/openstackhelm/heat:newton-ubuntu_xenial
|
||||||
pull_policy: IfNotPresent
|
pull_policy: IfNotPresent
|
||||||
local_registry:
|
local_registry:
|
||||||
active: false
|
active: false
|
||||||
@ -53,6 +54,13 @@ pod:
|
|||||||
register_kibana_indexes:
|
register_kibana_indexes:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
|
flush_kibana_metadata:
|
||||||
|
pod:
|
||||||
|
runAsUser: 1000
|
||||||
|
container:
|
||||||
|
flush_kibana_metadata:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
affinity:
|
affinity:
|
||||||
anti:
|
anti:
|
||||||
type:
|
type:
|
||||||
@ -102,6 +110,13 @@ pod:
|
|||||||
limits:
|
limits:
|
||||||
memory: "1024Mi"
|
memory: "1024Mi"
|
||||||
cpu: "2000m"
|
cpu: "2000m"
|
||||||
|
flush_kibana_metadata:
|
||||||
|
requests:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
probes:
|
probes:
|
||||||
kibana:
|
kibana:
|
||||||
kibana:
|
kibana:
|
||||||
@ -145,13 +160,26 @@ dependencies:
|
|||||||
- endpoint: internal
|
- endpoint: internal
|
||||||
service: local_image_registry
|
service: local_image_registry
|
||||||
kibana:
|
kibana:
|
||||||
|
jobs:
|
||||||
|
- flush-kibana-metadata
|
||||||
services:
|
services:
|
||||||
- endpoint: internal
|
- endpoint: internal
|
||||||
service: elasticsearch
|
service: elasticsearch
|
||||||
register_kibana_indexes:
|
register_kibana_indexes:
|
||||||
|
jobs:
|
||||||
|
- flush-kibana-metadata
|
||||||
services:
|
services:
|
||||||
- endpoint: internal
|
- endpoint: internal
|
||||||
service: kibana
|
service: kibana
|
||||||
|
flush_kibana_metadata:
|
||||||
|
services:
|
||||||
|
- endpoint: internal
|
||||||
|
service: elasticsearch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
flush_kibana_metadata:
|
||||||
|
backoffLimit: 6
|
||||||
|
activeDeadlineSeconds: 600
|
||||||
|
|
||||||
conf:
|
conf:
|
||||||
httpd: |
|
httpd: |
|
||||||
@ -396,5 +424,5 @@ manifests:
|
|||||||
service: true
|
service: true
|
||||||
service_ingress: true
|
service_ingress: true
|
||||||
job_register_kibana_indexes: true
|
job_register_kibana_indexes: true
|
||||||
wait_for_kibana_pods_readiness: false
|
job_flush_kibana_metadata: true
|
||||||
...
|
...
|
||||||
|
@ -9,4 +9,5 @@ kibana:
|
|||||||
- 0.1.6 Remove Kibana indices before pod start up
|
- 0.1.6 Remove Kibana indices before pod start up
|
||||||
- 0.1.7 Helm 3 - Fix Job labels
|
- 0.1.7 Helm 3 - Fix Job labels
|
||||||
- 0.1.8 Update htk requirements
|
- 0.1.8 Update htk requirements
|
||||||
|
- 0.1.9 Revert removing Kibana indices before pod start up
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user