xtf-cz / xtf

MIT License
12 stars 55 forks source link

configMapKeyRef and secretKeyRef: name and key are inverted #548

Closed mnovak1 closed 1 year ago

mnovak1 commented 1 year ago

This MR fixed the DeploymentConfig produced by ContainerBuilder: At present key and name are inverted:

        - name: POSTGRESQL_ADMIN_PASSWORD
          valueFrom:
            configMapKeyRef:
              name: postgresql-admin-password
              key: postgresql
        - name: POSTGRESQL_PASSWORD
          valueFrom:
            configMapKeyRef:
              name: postgresql-password
              key: postgresql
        - name: POSTGRESQL_USER
          valueFrom:
            configMapKeyRef:
              name: postgresql-user
              key: postgresql

with this MR, the correct output is

        - name: POSTGRESQL_ADMIN_PASSWORD
          valueFrom:
            configMapKeyRef:
              name: postgresql
              key: postgresql-admin-password
        - name: POSTGRESQL_PASSWORD
          valueFrom:
            configMapKeyRef:
              name: postgresql
              key: postgresql-password
        - name: POSTGRESQL_USER
          valueFrom:
            configMapKeyRef:
              name: postgresql
              key: postgresql-user

Similarly for secretKeyRef.

mnovak1 commented 1 year ago

PRs: https://github.com/xtf-cz/xtf/pull/546 and https://github.com/xtf-cz/xtf/pull/547

mnovak1 commented 1 year ago

Thanks @tommaso-borgato for solving this issue! :-)