cyberark / conjur-oss-helm-chart

Helm chart for deploying Conjur OSS to Kubernetes
Apache License 2.0
28 stars 24 forks source link

Issue to use tag format as image.tag=1.11.1 #114

Closed poyaskov closed 3 years ago

poyaskov commented 3 years ago

Summary

There is an issue with helm chart to use tag format as image.tag=1.11.1

If you use next example:

$  CONJUR_NAMESPACE=my-conjur-namespace
$  kubectl create namespace "$CONJUR_NAMESPACE"
$  DATA_KEY="$(docker run --rm cyberark/conjur data-key generate)"
$  HELM_ARGS="--set dataKey=$DATA_KEY \
              --set image.tag=1.11.1 \
              --set image.pullPolicy=IfNotPresent \
              --set ssl.hostname=custom.domainname.com
$  helm install \
   -n "$CONJUR_NAMESPACE" \
   $HELM_ARGS \
   conjur-oss \
   https://github.com/cyberark/conjur-oss-helm-chart/releases/download/v<VERSION>/conjur-oss-<VERSION>.tgz

You are getting in the k8s deployment spec wrong Conjur image tag=1.11.1:

...

    - name: CONJUR_ACCOUNT
      value: default
    - name: CONJUR_LOG_LEVEL
      value: debug
    image: cyberark/conjur:1.11.1                 # where is image cyberark/conjur:1.11.1 does not exist
    imagePullPolicy: IfNotPresent
    livenessProbe:
      failureThreshold: 180
      httpGet:
        path: /
        port: 80
        scheme: HTTP

...

k8s sheduller is unable to create pod:

$ kubectl --namespace oss-conjur get pod
NAME                              READY   STATUS             RESTARTS   AGE
pod/conjur-oss-7447b68c6f-bx7zm   1/2     CrashLoopBackOff   35         168m

Pod log:

Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Pulling    26s                kubelet            Pulling image "nginx:1.15"
  Normal   Pulled     26s                kubelet            Successfully pulled image "nginx:1.15" in 811.014551ms
  Normal   Created    26s                kubelet            Created container conjur-oss-nginx
  Normal   Started    25s                kubelet            Started container conjur-oss-nginx
  Normal   BackOff    24s                kubelet            Back-off pulling image "cyberark/conjur:1.11.1"
  Warning  Failed     24s                kubelet            Error: ImagePullBackOff
  Normal   Pulling    12s (x2 over 25s)  kubelet            Pulling image "cyberark/conjur:1.11.1"
  Warning  Failed     11s (x2 over 25s)  kubelet            Failed to pull image "cyberark/conjur:1.11.1": rpc error: code = Unknown desc = Error response from daemon: manifest for cyberark/conjur:1.11.1 not found: manifest unknown: manifest unknown
  Warning  Failed     11s (x2 over 25s)  kubelet            Error: ErrImagePull

Correct image tag is v1.11.1

But once I updated tag in the the variable like:

HELM_ARGS="--set dataKey=$DATA_KEY \
              --set image.tag=v1.11.1 \
              --set image.pullPolicy=IfNotPresent \
              --set ssl.hostname=custom.domainname.com

I'm getting parsing error:

]$ helm install -n  \ 
             "$CONJUR_NAMESPACE" \ 
              $HELM_ARGS conjur-oss \
              https://github.com/cyberark/conjur-oss-helm-chart/releases/download/v$VERSION/conjur-oss-$VERSION.tgz

Error: values don't meet the specifications of the schema(s) in the following chart(s):
conjur-oss:
- image.tag: Does not match pattern '(^\d+(\.\d+){0,2})$'

Reproducible

Solution

There is the only way to fix it to update Deployment directly with correct tag.

BradleyBoutcher commented 3 years ago

Hi @poyaskov,

Our value schema no longer requires the tag to match a specific pattern, so I think you may be using an older version of our helm chart. Can you update to 2.0.1 and let us know if this issue persists? Thank you!

izgeri commented 3 years ago

It's also worth noting that there was an issue with the v1.11.1 tag in DockerHub, which has now been fixed. The chart value should be 1.11.1. @poyaskov hopefully this resolves your issue; please let us know if it doesn't. If we don't hear from you in the next few days we'll close this issue. Thanks!

BradleyBoutcher commented 3 years ago

Closing as it seems this was resolved with #115