Skip to content

Add '+' to image tag pattern #6024

@Elegant996

Description

@Elegant996

What happened?

When attempting to use newTag on an image that contained a + in its tag, kustomize would not replace the tag.

What did you expect to happen?

For the image to receive the new tag.

How can we reproduce it (as minimally and precisely as possible)?

# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- resources.yaml

images:
- name: busybox:
  newTag: 1.37
# resources.yaml
apiVersion: v1
kind: Pod
metadata:
  name: busybox
spec:
  - name: sleeper
    image: busybox:1.37+aaaaaaaaaaaa
    command: ["/bin/sh", "-c", "trap : TERM INT; sleep infinity & wait"]

Expected output

# resources.yaml
apiVersion: v1
kind: Pod
metadata:
  name: busybox
spec:
  - name: sleeper
    image: busybox:1.37
    command: ["/bin/sh", "-c", "trap : TERM INT; sleep infinity & wait"]

Actual output

# resources.yaml
apiVersion: v1
kind: Pod
metadata:
  name: busybox
spec:
  - name: sleeper
    image: busybox:1.37+aaaaaaaaaaaa
    command: ["/bin/sh", "-c", "trap : TERM INT; sleep infinity & wait"]

Kustomize version

5.8.0

Operating system

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.priority/awaiting-more-evidenceLowest priority. Possibly useful, but not yet enough support to actually get it done.triage/needs-informationIndicates an issue needs more information in order to work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions