ChrisHirsch / kuberhealthy-storage-check

A storage check for the kuberhealthy project
Apache License 2.0
10 stars 13 forks source link

Changing CHECK_STORAGE_IMAGE and CHECK_STORAGE_INIT_IMAGE has no affect #11

Closed DavidKittleSEL closed 4 years ago

DavidKittleSEL commented 4 years ago

I want to have the storage check use our local docker repo (configured as pull through cache for docker hub) instead of pulling from docker hub directly. As per the instructions in the readme I have specified the CHECK_STORAGE_IMAGE and CHECK_STORAGE_INIT_IMAGE environment variables to point to our local repo:

apiVersion: comcast.github.io/v1
kind: KuberhealthyCheck
metadata:
  name: storage-check
  namespace: {{ $.Release.Namespace }}
spec:
  runInterval: 1m
  timeout: 3m
  podSpec:
    containers:
      #updated to use our local artifactory
    - image: local.docker.com/chrishirsch/kuberhealthy-storage-check:v0.0.1
      imagePullPolicy: IfNotPresent
      name: main
      resources:
        requests:
          cpu: 10m
          memory: 50Mi
      securityContext:
        allowPrivilegeEscalation: false
        readOnlyRootFilesystem: true
      env:
        - name: CHECK_STORAGE_NAME
          value: rook-ceph-block
        - name: CHECK_STORAGE_PVC_STORAGE_CLASS_NAME
          value: rook-ceph-block
        - name: CHECK_NAMESPACE
          value: {{ $.Release.Namespace }}
        - name: CHECK_STORAGE_IMAGE
          value: local.docker.com/alpine:3.11
        - name: CHECK_STORAGE_INIT_IMAGE
          value: local.docker.com/alpine:3.11
    restartPolicy: Never
    serviceAccountName: storage-sa
    securityContext:
      runAsUser: 999
      fsGroup: 999

But when I look in kubectl I can see its stull pulling "alpine:3.11" not "local.docker.com/alpine:3.11":

> kubectl describe pods rook-ceph-block-check-job-gfhr8
Name:         rook-ceph-block-check-job-gfhr8
...
Containers:
  rook-ceph-block-check-job:
    Container ID:  docker://31930b240aa748805666de729c1def47f2504d46f632f637df49984c3bde457d
    Image:         alpine:3.11
...
github-actions[bot] commented 4 years ago

:wave: Welcome to Kuberhealthy Storage Check. Thanks for opening your first issue.

DavidKittleSEL commented 4 years ago

Oh nevermind, this was a typo in my answer file. This is working as expected