Skip to content

feat: Make files the same as would be exported from kubectl get something -o yaml #44

@kostis-codefresh

Description

@kostis-codefresh

The current output from the tool seems to have strange formatting

  • Keys are capitalized and have spaces
  • Some values have english descriptions

Example 1

  Containers:
   server:
    Image:           quay.io/codefresh/argocd:v2.14.9-2025-06-08-8821b48e
    Ports:           8080/TCP, 8083/TCP
    Host Ports:      0/TCP, 0/TCP
    SeccompProfile:  RuntimeDefault
    Args:
      /usr/local/bin/argocd-server
      --port=8080
      --metrics-port=8083

What I would expect instead

     containers:
      - args:
        - /usr/local/bin/argocd-server
        - --port=8080
        - --metrics-port=8083
        image: quay.io/argoproj/argocd:v3.0.11
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz?full=true
            port: server
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: server
        ports:
        - containerPort: 8080
          name: server
          protocol: TCP
        - containerPort: 8083
          name: metrics
          protocol: TCP 

Example 2

Environment:
      ARGOCD_SERVER_NAME:                                             argo-cd-server
      ARGOCD_SERVER_INSECURE:                                         <set to the key 'server.insecure' of config map 'argocd-cmd-params-cm'>                                        Optional: true
      ARGOCD_SERVER_BASEHREF:                                         <set to the key 'server.basehref' of config map 'argocd-cmd-params-cm'>                                        Optional: true
      ARGOCD_SERVER_ROOTPATH:                                         <set to the key 'server.rootpath' of config map 'argocd-cmd-params-cm'>                                        Optional: true
      ARGOCD_SERVER_LOGFORMAT:                                        <set to the key 'server.log.format' of config map 'argocd-cmd-params-cm'>                                      Optional: true

What I would expect instead

        env:
        - name: ARGOCD_SERVER_NAME
          value: argocd-server
        - name: ARGOCD_SERVER_INSECURE
          valueFrom:
            configMapKeyRef:
              key: server.insecure
              name: argocd-cmd-params-cm
              optional: true
        - name: ARGOCD_SERVER_BASEHREF
          valueFrom:
            configMapKeyRef:
              key: server.basehref
              name: argocd-cmd-params-cm
              optional: true
        - name: ARGOCD_SERVER_ROOTPATH
          valueFrom:
            configMapKeyRef:
              key: server.rootpath
              name: argocd-cmd-params-cm
              optional: true

Can we make the tool extract files in pure YAML format? The main reason is that we can post-process then the files with another tool that processes YAML.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions