{{- $render := include "eks-anywhere-packages.rendertype" . }}
{{- if not (eq $render "package") }}
{{ if .Capabilities.APIVersions.Has "packagecontrollers.packages.eks.amazonaws.com/v1alpha1/{{.Values.clusterName}}" -}}
{{- else -}}
apiVersion: packages.eks.amazonaws.com/v1alpha1
kind: PackageBundleController
metadata:
  name: {{.Values.clusterName}}
  namespace: eksa-packages
spec:
  upgradeCheckInterval: 24h
  upgradeCheckShortInterval: 10s
  defaultRegistry: {{.Values.defaultRegistry}}
  defaultImageRegistry: {{.Values.defaultImageRegistry}}
  privateRegistry: {{.Values.privateRegistry}}
{{- end -}}
{{- end -}}
