mirror of
https://github.com/fluxcd/flux2.git
synced 2025-11-02 02:35:49 +08:00
fix: Remove any leading and trailing whitespace from resource before
exporting Signed-off-by: Yiannis <yiannistri@users.noreply.github.com>
This commit is contained in:
@ -122,5 +122,6 @@ func printExport(export interface{}) error {
|
||||
func resourceToString(data []byte) string {
|
||||
data = bytes.Replace(data, []byte(" creationTimestamp: null\n"), []byte(""), 1)
|
||||
data = bytes.Replace(data, []byte("status: {}\n"), []byte(""), 1)
|
||||
data = bytes.TrimSpace(data)
|
||||
return string(data)
|
||||
}
|
||||
|
||||
@ -12,4 +12,3 @@ spec:
|
||||
ref:
|
||||
branch: master
|
||||
url: https://github.com/stefanprodan/podinfo
|
||||
|
||||
|
||||
@ -7,4 +7,3 @@ metadata:
|
||||
spec:
|
||||
interval: 5m0s
|
||||
url: https://stefanprodan.github.io/charts/podinfo
|
||||
|
||||
|
||||
@ -10,4 +10,3 @@ spec:
|
||||
name: creds
|
||||
type: oci
|
||||
url: oci://ghcr.io/stefanprodan/charts/podinfo
|
||||
|
||||
|
||||
@ -8,4 +8,3 @@ spec:
|
||||
interval: 5m0s
|
||||
type: oci
|
||||
url: oci://ghcr.io/stefanprodan/charts/podinfo
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/alert.yaml
vendored
1
cmd/flux/testdata/export/alert.yaml
vendored
@ -14,4 +14,3 @@ spec:
|
||||
providerRef:
|
||||
name: slack
|
||||
summary: Slacktest Notification
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/bucket.yaml
vendored
1
cmd/flux/testdata/export/bucket.yaml
vendored
@ -11,4 +11,3 @@ spec:
|
||||
provider: aws
|
||||
region: us-east-1
|
||||
timeout: 30s
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/git-repo.yaml
vendored
1
cmd/flux/testdata/export/git-repo.yaml
vendored
@ -13,4 +13,3 @@ spec:
|
||||
name: flux-system
|
||||
timeout: 1m0s
|
||||
url: ssh://git@github.com/example/repo
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/helm-release.yaml
vendored
1
cmd/flux/testdata/export/helm-release.yaml
vendored
@ -15,4 +15,3 @@ spec:
|
||||
namespace: {{ .fluxns }}
|
||||
version: '*'
|
||||
interval: 5m0s
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/helm-repo.yaml
vendored
1
cmd/flux/testdata/export/helm-repo.yaml
vendored
@ -9,4 +9,3 @@ spec:
|
||||
provider: generic
|
||||
timeout: 1m0s
|
||||
url: https://stefanprodan.github.io/podinfo
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/image-policy.yaml
vendored
1
cmd/flux/testdata/export/image-policy.yaml
vendored
@ -10,4 +10,3 @@ spec:
|
||||
policy:
|
||||
semver:
|
||||
range: 5.0.x
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/image-repo.yaml
vendored
1
cmd/flux/testdata/export/image-repo.yaml
vendored
@ -10,4 +10,3 @@ spec:
|
||||
image: ghcr.io/test/podinfo
|
||||
interval: 1m0s
|
||||
provider: generic
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/image-update.yaml
vendored
1
cmd/flux/testdata/export/image-update.yaml
vendored
@ -17,4 +17,3 @@ spec:
|
||||
update:
|
||||
path: ./clusters/my-cluster
|
||||
strategy: Setters
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/ks.yaml
vendored
1
cmd/flux/testdata/export/ks.yaml
vendored
@ -11,4 +11,3 @@ spec:
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/provider.yaml
vendored
1
cmd/flux/testdata/export/provider.yaml
vendored
@ -8,4 +8,3 @@ spec:
|
||||
address: https://hooks.slack.com/services/mock
|
||||
channel: A channel with spacess
|
||||
type: slack
|
||||
|
||||
|
||||
1
cmd/flux/testdata/export/receiver.yaml
vendored
1
cmd/flux/testdata/export/receiver.yaml
vendored
@ -15,4 +15,3 @@ spec:
|
||||
secretRef:
|
||||
name: webhook-token
|
||||
type: github
|
||||
|
||||
|
||||
1
cmd/flux/testdata/oci/export.golden
vendored
1
cmd/flux/testdata/oci/export.golden
vendored
@ -9,4 +9,3 @@ spec:
|
||||
ref:
|
||||
tag: 6.3.5
|
||||
url: oci://ghcr.io/stefanprodan/manifests/podinfo
|
||||
|
||||
|
||||
@ -11,4 +11,3 @@ spec:
|
||||
secretRef:
|
||||
name: creds
|
||||
url: oci://ghcr.io/stefanprodan/manifests/podinfo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user