I have got a following yml file after doing kompose convert But, I want to add imagePullSecrets in the conversion output. Instead of everytime making a local change, I would like to put something in docker-compose.yml so that it gets converted automatically in kubernetes yml.
Similar usecase is needed for number of replicas as well.
How to achieve this?
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert -f monitor.yml
    kompose.deployment.spec.replicas: "2" 
  name: monitor
spec:
  replicas: 1
  template:
    spec:
      containers:
      - command:
        - python
        image: example.com/monitor
        name: monitor
        ports:
        - containerPort: 9990
        resources: {}
        stdin: true
        tty: true
        workingDir: /path/to/code
      restartPolicy: Always
status: {}
You can (now) use a kompose.image-pull-secret label
https://github.com/kubernetes/kompose/blob/master/docs/user-guide.md#labels
https://github.com/kubernetes/kompose/pull/1040
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With