Skip to content

[Bug]: missing apiVersion for CronJob and HorizontalPodAutoscaler in generate mode #2767

@chlunde

Description

@chlunde

What happened?

In generate mode, the apiVersion for CronJob and HorizontalPodAutoscaler (HPA) is missing in the YAML manifest.

Steps to reproduce

  1. go run . generate --cr examples/simple-prod.yaml | grep -E '(Horiz|CronJob)' -A 1 -B 1
---
kind: CronJob
metadata:
--
---
kind: CronJob
metadata:
--
---
kind: HorizontalPodAutoscaler
metadata:

notice: no apiVersion

Expected behavior

apiVersion: batch/v1
kind: CronJob
metadata:
--
apiVersion: batch/v1
kind: CronJob
metadata:
--
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions