mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-21 07:01:47 +00:00
Merge pull request #3721 from yiannistri/3593-fix-double-newline
fix: Avoid printing an extra newline when exporting resources
This commit is contained in:
commit
10f8849e12
18 changed files with 1 additions and 17 deletions
|
|
@ -122,5 +122,6 @@ func printExport(export interface{}) error {
|
||||||
func resourceToString(data []byte) string {
|
func resourceToString(data []byte) string {
|
||||||
data = bytes.Replace(data, []byte(" creationTimestamp: null\n"), []byte(""), 1)
|
data = bytes.Replace(data, []byte(" creationTimestamp: null\n"), []byte(""), 1)
|
||||||
data = bytes.Replace(data, []byte("status: {}\n"), []byte(""), 1)
|
data = bytes.Replace(data, []byte("status: {}\n"), []byte(""), 1)
|
||||||
|
data = bytes.TrimSpace(data)
|
||||||
return string(data)
|
return string(data)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,3 @@ spec:
|
||||||
ref:
|
ref:
|
||||||
branch: master
|
branch: master
|
||||||
url: https://github.com/stefanprodan/podinfo
|
url: https://github.com/stefanprodan/podinfo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,3 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
interval: 5m0s
|
interval: 5m0s
|
||||||
url: https://stefanprodan.github.io/charts/podinfo
|
url: https://stefanprodan.github.io/charts/podinfo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,3 @@ spec:
|
||||||
name: creds
|
name: creds
|
||||||
type: oci
|
type: oci
|
||||||
url: oci://ghcr.io/stefanprodan/charts/podinfo
|
url: oci://ghcr.io/stefanprodan/charts/podinfo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,3 @@ spec:
|
||||||
interval: 5m0s
|
interval: 5m0s
|
||||||
type: oci
|
type: oci
|
||||||
url: oci://ghcr.io/stefanprodan/charts/podinfo
|
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:
|
providerRef:
|
||||||
name: slack
|
name: slack
|
||||||
summary: Slacktest Notification
|
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
|
provider: aws
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
timeout: 30s
|
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
|
name: flux-system
|
||||||
timeout: 1m0s
|
timeout: 1m0s
|
||||||
url: ssh://git@github.com/example/repo
|
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 }}
|
namespace: {{ .fluxns }}
|
||||||
version: '*'
|
version: '*'
|
||||||
interval: 5m0s
|
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
|
provider: generic
|
||||||
timeout: 1m0s
|
timeout: 1m0s
|
||||||
url: https://stefanprodan.github.io/podinfo
|
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:
|
policy:
|
||||||
semver:
|
semver:
|
||||||
range: 5.0.x
|
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
|
image: ghcr.io/test/podinfo
|
||||||
interval: 1m0s
|
interval: 1m0s
|
||||||
provider: generic
|
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:
|
update:
|
||||||
path: ./clusters/my-cluster
|
path: ./clusters/my-cluster
|
||||||
strategy: Setters
|
strategy: Setters
|
||||||
|
|
||||||
|
|
|
||||||
1
cmd/flux/testdata/export/ks.yaml
vendored
1
cmd/flux/testdata/export/ks.yaml
vendored
|
|
@ -11,4 +11,3 @@ spec:
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
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
|
address: https://hooks.slack.com/services/mock
|
||||||
channel: A channel with spacess
|
channel: A channel with spacess
|
||||||
type: slack
|
type: slack
|
||||||
|
|
||||||
|
|
|
||||||
1
cmd/flux/testdata/export/receiver.yaml
vendored
1
cmd/flux/testdata/export/receiver.yaml
vendored
|
|
@ -15,4 +15,3 @@ spec:
|
||||||
secretRef:
|
secretRef:
|
||||||
name: webhook-token
|
name: webhook-token
|
||||||
type: github
|
type: github
|
||||||
|
|
||||||
|
|
|
||||||
1
cmd/flux/testdata/oci/export.golden
vendored
1
cmd/flux/testdata/oci/export.golden
vendored
|
|
@ -9,4 +9,3 @@ spec:
|
||||||
ref:
|
ref:
|
||||||
tag: 6.3.5
|
tag: 6.3.5
|
||||||
url: oci://ghcr.io/stefanprodan/manifests/podinfo
|
url: oci://ghcr.io/stefanprodan/manifests/podinfo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,3 @@ spec:
|
||||||
secretRef:
|
secretRef:
|
||||||
name: creds
|
name: creds
|
||||||
url: oci://ghcr.io/stefanprodan/manifests/podinfo
|
url: oci://ghcr.io/stefanprodan/manifests/podinfo
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue