Skip to content

Commit

Permalink
chore: add document separator to the generated manifests (#3462)
Browse files Browse the repository at this point in the history
Signed-off-by: Ankur Kothiwal <ankur.kothiwal@cern.com>
Co-authored-by: Ankur Kothiwal <ankur.kothiwal@cern.com>
Co-authored-by: Rita Zhang <rita.z.zhang@gmail.com>
  • Loading branch information
3 people authored Aug 2, 2024
1 parent 4be061f commit 4571e0e
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/build/helmify/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ func (ks *kindSet) Write() error {

fmt.Printf("Writing %s\n", destFile)

if err := os.WriteFile(destFile, []byte(obj), 0o600); err != nil {
addSeparator := "---\n" + obj
if err := os.WriteFile(destFile, []byte(addSeparator), 0o600); err != nil {
return err
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if .Values.serviceAccount.gatekeeperAdmin.create }}
apiVersion: v1
kind: ServiceAccount
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if not .Values.disableAudit }}
apiVersion: apps/v1
kind: Deployment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- $v1 := .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" -}}
{{- $v1beta1 := .Capabilities.APIVersions.Has "policy/v1beta1/PodDisruptionBudget" -}}
apiVersion: policy/v1{{- if and (not $v1) $v1beta1 -}}beta1{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if .Values.resourceQuota }}
apiVersion: v1
kind: ResourceQuota
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if not .Values.disableMutation }}
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if not .Values.disableValidatingWebhook }}
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
{{- if not .Values.externalCertInjection.enabled }}
apiVersion: v1
kind: Secret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Service
metadata:
Expand Down

0 comments on commit 4571e0e

Please sign in to comment.