0

i have this:

kustomization.yaml:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

configurations:
- configuration.yaml

namePrefix: app-prefix-

resources:
- logging-output.yaml
- logging-flow.yaml

logging-flow.yaml:

apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:
  name: app
spec:
  localOutputRefs:
  - loki-output
  match:
  - select:
      labels:
        app: app

configuration.yaml:

namePrefix:
- path: spec/localOutputRefs/0
  kind: Flow

I need to change spec/localOutputRefs/0 in logging-flow.yaml to add the prefix too, but i get the error:

Error: accumulating resources: accumulation err='accumulating resources from '../base/': 'app/base' must resolve to a file': recursed accumulation of path 'app/base': considering field 'spec/localOutputRefs' of object
....
: visit traversal on path: [0]: expected sequence or mapping node

I have a similar error with commonLabels too, but i think this is the format of the path. I know, i can make this with patch, but this is a work how nameprefix and commonlabels is supposed to do.

Expected output:

apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:
  name: app-prefix-app
spec:
  localOutputRefs:
  - app-prefix-loki-output
  match:
  - select:
      labels:
        app: app
New contributor
Psycho Mantys is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Psycho Mantys is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.