Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

imagePullSecrets are dropped on the floor #304

Closed
snoby opened this issue Oct 3, 2017 · 5 comments
Closed

imagePullSecrets are dropped on the floor #304

snoby opened this issue Oct 3, 2017 · 5 comments

Comments

@snoby
Copy link

snoby commented Oct 3, 2017

While generating a template that used imagePullSecrets I determined that the kedge templating engine drops the "imagePullSecrets" on the floor and doesn't bring them over to the final rendered output.
The debug output is of very little use
the template:

name: sparky
labels:
  app: sparky
replicas: 1
containers:
- name: sparky
  image: sparkb/sparky:UNKNOWN_VERSION
  imagePullSecrets:
    - name: dockerhub-key
  livenessProbe:
    httpGet:
      path: /liveness
      port: 10009
  readinessProbe:
    httpGet:
      path: /ready
      port: 10009
  resources:
    limits:
      cpu: 500m
      memory: 256Mi
    requests:
      cpu: 300m
      memory: 128Mi

the output result:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: sparky
  name: sparky
spec:
  replicas: 1
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: sparky
      name: sparky
    spec:
      containers:
      - image: sparkbo/sparky:UNKNOWN_VERSION
        livenessProbe:
          httpGet:
            path: /liveness
            port: 10009
        name: sparky
        readinessProbe:
          httpGet:
            path: /ready
            port: 10009
        resources:
          limits:
            cpu: 500m
            memory: 256Mi
          requests:
            cpu: 300m
            memory: 128Mi
status: {}

This along with the lack of passing annotations limits the effectiveness of this potentially wonderful tool!

@surajssd
Copy link
Member

surajssd commented Oct 3, 2017

@snoby thanks for trying out kedge.

imagePullSecrets is a pod level field, not a container level field. So please modify the yaml to look like this:

name: sparky
labels:
  app: sparky
replicas: 1
containers:
- name: sparky
  image: sparkb/sparky:UNKNOWN_VERSION
  livenessProbe:
    httpGet:
      path: /liveness
      port: 10009
  readinessProbe:
    httpGet:
      path: /ready
      port: 10009
  resources:
    limits:
      cpu: 500m
      memory: 256Mi
    requests:
      cpu: 300m
      memory: 128Mi
imagePullSecrets:
- name: dockerhub-key

And now run generate, it will generate it for you.

$ kedge generate -f file.yaml 
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: sparky
  name: sparky
spec:
  replicas: 1
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: sparky
      name: sparky
    spec:
      containers:
      - image: sparkb/sparky:UNKNOWN_VERSION
        livenessProbe:
          httpGet:
            path: /liveness
            port: 10009
        name: sparky
        readinessProbe:
          httpGet:
            path: /ready
            port: 10009
        resources:
          limits:
            cpu: 500m
            memory: 256Mi
          requests:
            cpu: 300m
            memory: 128Mi
      imagePullSecrets:
      - name: dockerhub-key
status: {}

HTH 🙂

@snoby
Copy link
Author

snoby commented Oct 3, 2017

AH yes indeed. I thought I had tried that. Man guys just get annotations to work and it's exactly the tool I need!!!!!
Thank you

@snoby snoby closed this as completed Oct 3, 2017
@surajssd
Copy link
Member

surajssd commented Oct 3, 2017

Man guys just get annotations to work and it's exactly the tool I need!!!!!

We are in discussion of how do we add support of annotations!

@containscafeine you might wanna link this as a feature request from user!

@kadel
Copy link
Member

kadel commented Oct 4, 2017

Mistakes like this should be cached by Kedge. This goes back to #168
We should start working on solving this.

@surajssd
Copy link
Member

surajssd commented Oct 5, 2017

ping @surajnarwade

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants