Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

[Kibana] the setting imagePullPolicy is ignored #198

Closed
kuisathaverat opened this issue Jul 2, 2019 · 1 comment · Fixed by #204
Closed

[Kibana] the setting imagePullPolicy is ignored #198

kuisathaverat opened this issue Jul 2, 2019 · 1 comment · Fixed by #204
Assignees
Labels
bug Something isn't working

Comments

@kuisathaverat
Copy link
Contributor

kuisathaverat commented Jul 2, 2019

Chart version:
7.2.0, 7.1.1, 7.1.0

Kubernetes version:

1.11.10-gke.5

Kubernetes provider: E.g. GKE (Google Kubernetes Engine)

GKE

Helm Version:

Client: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}

helm get kibana output

REVISION: 1
RELEASED: Tue Jun 18 13:38:09 2019
CHART: kibana-7.1.1
USER-SUPPLIED VALUES:
elasticsearchURL: http://elasticsearch-master:9200
extraEnvs:
- name: ELASTICSEARCH_HOSTS
  value: http://elasticsearch-master:9200
- name: SERVER_HOST
  value: 0.0.0.0
- name: siem.enabled
  value: "false"
httpPort: 5601
image: docker.example.com/kibana
imagePullPolicy: IfNotPresent
imagePullSecrets:
- name: docker.example.com
imageTag: 8.0.0-SNAPSHOT
ingress:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/auth-realm: Authentication Required
    nginx.ingress.kubernetes.io/auth-secret: basic-auth
    nginx.ingress.kubernetes.io/auth-type: basic
  enabled: true
  hosts:
  - myhost.example.com
  path: /
  tls:
  - hosts:
    - myhost.example.com
    secretName: ingress-tls
kibanaConfig:
  kibana.yml: |-
    kibana.index: ".kibana_k8s"
    xpack.task_manager.index: ".kibana_task_manager_k8s"
protocol: http
replicas: 1
resources:
  limits:
    cpu: 1000m
    memory: 1Gi
  requests:
    cpu: 100m
    memory: 500m
service:
  port: 5601
  type: ClusterIP

COMPUTED VALUES:
affinity: {}
antiAffinity: hard
antiAffinityTopologyKey: kubernetes.io/hostname
elasticsearchHosts: http://elasticsearch-master:9200
elasticsearchURL: http://elasticsearch-master:9200
extraEnvs:
- name: ELASTICSEARCH_HOSTS
  value: http://elasticsearch-master:9200
- name: SERVER_HOST
  value: 0.0.0.0
- name: siem.enabled
  value: "false"
fullnameOverride: ""
healthCheckPath: /app/kibana
httpPort: 5601
image: docker.example.com/kibana
imagePullPolicy: IfNotPresent
imagePullSecrets:
- name: docker.example.com
imageTag: 8.0.0-SNAPSHOT
ingress:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/auth-realm: Authentication Required
    nginx.ingress.kubernetes.io/auth-secret: basic-auth
    nginx.ingress.kubernetes.io/auth-type: basic
  enabled: true
  hosts:
  - myhost.example.com
  path: /
  tls:
  - hosts:
    - myhost.example.com
    secretName: ingress-tls
kibanaConfig:
  kibana.yml: |-
    kibana.index: ".kibana_k8s"
    xpack.task_manager.index: ".kibana_task_manager_k8s"
maxUnavailable: 1
nameOverride: ""
nodeSelector: {}
podSecurityContext: {}
priorityClassName: ""
protocol: http
readinessProbe:
  failureThreshold: 3
  initialDelaySeconds: 10
  periodSeconds: 10
  successThreshold: 3
  timeoutSeconds: 5
replicas: 1
resources:
  limits:
    cpu: 1000m
    memory: 1Gi
  requests:
    cpu: 100m
    memory: 500m
secretMounts: []
service:
  annotations: {}
  port: 5601
  type: ClusterIP
serviceAccount: ""
tolerations: []
updateStrategy:
  type: Recreate

HOOKS:
MANIFEST:

---
# Source: kibana/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: kibana-kibana-config
  labels:
    app: kibana
    release: "kibana"
data:
  kibana.yml: |
    kibana.index: ".kibana_k8s"
    xpack.task_manager.index: ".kibana_task_manager_k8s"
---
# Source: kibana/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: kibana-kibana
  labels:
    app: kibana
    release: "kibana"
    heritage: Tiller
spec:
  type: ClusterIP
  ports:
    - port: 5601
      protocol: TCP
      name: http
      targetPort: 5601
  selector:
    app: kibana
    release: "kibana"
---
# Source: kibana/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kibana-kibana
  labels:
    app: kibana
    release: "kibana"
spec:
  replicas: 1
  strategy:
    type: Recreate
    
  selector:
    matchLabels:
      app: kibana
      release: "kibana"
  template:
    metadata:
      labels:
        app: kibana
        release: "kibana"
      annotations:
        
        configchecksum: 9609b977f2be85130821968bbab389341e4d80234830623b84ac53d09b4ac6c
    spec:
      volumes:
        - name: kibanaconfig
          configMap:
            name: kibana-kibana-config
      imagePullSecrets:
        - name: docker.example.com
        
      containers:
      - name: kibana
        image: "docker.example.com/kibana:8.0.0-SNAPSHOT"
        env:
          - name: ELASTICSEARCH_URL
            value: "http://elasticsearch-master:9200"
          - name: ELASTICSEARCH_HOSTS
            value: http://elasticsearch-master:9200
          - name: SERVER_HOST
            value: 0.0.0.0
          - name: siem.enabled
            value: "false"
          
        readinessProbe:
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 3
          timeoutSeconds: 5
          
          exec:
            command: 
              - sh
              - -c
              - |
                #!/usr/bin/env bash -e
                http () {
                    local path="${1}"
                    set -- -XGET -s --fail

                    if [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then
                      set -- "$@" -u "${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}"
                    fi

                    curl -k "$@" "http://localhost:5601${path}"
                }
  
                http "/app/kibana"
        ports:
        - containerPort: 5601
        resources:
          limits:
            cpu: 1000m
            memory: 1Gi
          requests:
            cpu: 100m
            memory: 500m
          
        volumeMounts:
          - name: kibanaconfig
            mountPath: /usr/share/kibana/config/kibana.yml
            subPath: kibana.yml
---
# Source: kibana/templates/ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: kibana-kibana
  labels:
    app: kibana
    release: kibana
    heritage: Tiller
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/auth-realm: Authentication Required
    nginx.ingress.kubernetes.io/auth-secret: basic-auth
    nginx.ingress.kubernetes.io/auth-type: basic
    
spec:
  tls:
    - hosts:
        - myhost.example.com
      secretName: ingress-tls
  rules:
    - host: myhost.example.com
      http:
        paths:
          - path: /
            backend:
              serviceName: kibana-kibana
              servicePort: 5601

Describe the bug:

the setting imagePullPolicy is ignored.

Steps to reproduce:

  1. install the helm package helm install --wait --timeout 600 --name kibana elastic/kibana --version 7.2.0 --values values.yml
  2. check the YAML deployment kubectl get deployment kibana-kibana -o json
  3. is not correct imagePullPolicy is set to "IfNoPresent"

Expected behavior:

The deployment kibana-kibana should have imagePullPolicy set to "Always"

Provide logs and/or server output (if relevant):

values.yml file

elasticsearchURL: "http://elasticsearch-master:9200"
replicas: 1
image: "docker.elastic.co/kibana"
imageTag: "7.2.0"
imagePullPolicy: "Always"
imagePullSecrets:
  - name: docker.elastic.co
resources:
  requests:
    cpu: "100m"
    memory: "500m"
  limits:
    cpu: "1000m"
    memory: "1Gi"
protocol: http
httpPort: 5601
extraEnvs:
  - name: ELASTICSEARCH_HOSTS
    value: "http://elasticsearch-master:9200"
  - name: SERVER_HOST
    value: "0.0.0.0"
service:
  type: ClusterIP
  port: 5601
kibanaConfig:
  kibana.yml: |-
    kibana.index: ".kibana_k8s"
    xpack.task_manager.index: ".kibana_task_manager_k8s"

Any additional context:

@Crazybus Crazybus added the bug Something isn't working label Jul 5, 2019
@Crazybus Crazybus self-assigned this Jul 5, 2019
@Crazybus
Copy link
Contributor

Crazybus commented Jul 5, 2019

100% a bug. This is documented in the readme, and has a value in the values.yml but isn't actually implemented. PR incoming.

Crazybus added a commit that referenced this issue Jul 5, 2019
Fixes: #198

This value was documented and configurable but wasn't implemented in the
template.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants