Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

bug: onMissing.action.inject confusing for multi-query #114

Open
@scottd018

Description

@scottd018

All paths with multi-query should show up on action inject.

Sample Manifest (/tmp/manifest.yaml):

---
apiVersion: v1
kind: Service
metadata:
  name: postgres
  namespace: my-app
spec:
  type: ClusterIP
  ports:
    - port: 5432
  selector:
    app: postgres

Sample Instruction File (/tmp/instructions.yaml):

yamlFiles:
  - name: "apply postgres specific configuration"
    path: "/tmp/manifest.yaml"
    overlays:
      - name: "apply postgres common name and labels"
        query:
          - metadata.name
          - metadata.labels.app
        onMissing:
          action: inject
        value: potato

Output of yot -i /tmp/instructions.yaml -s:

---
apiVersion: v1
kind: Service
metadata:
  name: potato
  namespace: my-app
spec:
  type: ClusterIP
  ports:
    - port: 5432
  selector:
    app: postgres

Expected:

---
apiVersion: v1
kind: Service
metadata:
  name: potato
  namespace: my-app
  labels:
    app: potato <<<<<<<<< this should be injected
spec:
  type: ClusterIP
  ports:
    - port: 5432
  selector:
    app: postgres

Metadata

Metadata

Assignees

No one assigned

    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