Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This is done by detaching pilot from helm.sh/helm/v3.

Signed-off-by: Dhi Aurrahman <[email protected]>
  • Loading branch information
dio committed Feb 19, 2024
1 parent aebf50d commit 5a482d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 8 additions & 4 deletions operator/pkg/name/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (

"istio.io/api/operator/v1alpha1"
iop "istio.io/istio/operator/pkg/apis/istio/v1alpha1"
"istio.io/istio/operator/pkg/helm"
"istio.io/istio/operator/pkg/tpath"
)

Expand Down Expand Up @@ -85,6 +84,11 @@ const (
InstalledSpecCRPrefix = "installed-state"
)

const (
// YAMLSeparator is a separator for multi-document YAML files.
YAMLSeparator = "\n---\n"
)

// ComponentName is a component name string, typed to constrain allowed values.
type ComponentName string

Expand Down Expand Up @@ -173,7 +177,7 @@ func (mm ManifestMap) Consolidated() map[string]string {
for cname, ms := range mm {
allM := ""
for _, m := range ms {
allM += m + helm.YAMLSeparator
allM += m + YAMLSeparator
}
out[string(cname)] = allM
}
Expand All @@ -182,15 +186,15 @@ func (mm ManifestMap) Consolidated() map[string]string {

// MergeManifestSlices merges a slice of manifests into a single manifest string.
func MergeManifestSlices(manifests []string) string {
return strings.Join(manifests, helm.YAMLSeparator)
return strings.Join(manifests, YAMLSeparator)
}

// String implements the Stringer interface.
func (mm ManifestMap) String() string {
out := ""
for _, ms := range mm {
for _, m := range ms {
out += m + helm.YAMLSeparator
out += m + YAMLSeparator
}
}
return out
Expand Down
3 changes: 1 addition & 2 deletions operator/pkg/object/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"sigs.k8s.io/yaml"

"istio.io/istio/operator/pkg/apis/istio/v1alpha1"
"istio.io/istio/operator/pkg/helm"
names "istio.io/istio/operator/pkg/name"
"istio.io/istio/operator/pkg/tpath"
"istio.io/istio/operator/pkg/util"
Expand Down Expand Up @@ -231,7 +230,7 @@ func (os K8sObjects) String() string {
for _, oo := range os {
out = append(out, oo.YAMLDebugString())
}
return strings.Join(out, helm.YAMLSeparator)
return strings.Join(out, YAMLSeparator)
}

// Keys returns a slice with the keys of os.
Expand Down

0 comments on commit 5a482d0

Please sign in to comment.