Behrang Saeedzadeh
Behrang Saeedzadeh

Reputation: 47961

What is the correct group for ConfigMaps in a Kustomize patch?

In general, how can I get the group name for any type of resource?

And in particular, what should I use for group here:

  - path: cm.patch.yaml
    target:
      kind: ConfigMap
      group: ""         # <------
      version: v1
      name: my-confif

Is it the empty string?

Upvotes: 1

Views: 1256

Answers (1)

David Maze
David Maze

Reputation: 159475

Look in the Kubernetes API documentation.

If you look at, for example, StorageClass, it says at the top of the page

apiVersion: storage.k8s.io/v1

So for this object, the group is storage.k8s.io, the version is v1, and the kind is StorageClass.

The ConfigMap page says just

apiVersion: v1

This is in the "core" group, and an empty string as you have it in the question is correct.

Upvotes: 3

Related Questions