- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for SplitYamlByKind (0.32 sec)
-
pkg/test/util/yml/parts.go
// accidentally splitting in cases where yaml resources contain nested yaml (which // is indented). var splitRegex = regexp.MustCompile(`(^|\n)---`) // SplitYamlByKind splits the given YAML into parts indexed by kind. func SplitYamlByKind(content string) map[string]string { cfgs := SplitString(content) result := map[string]string{} for _, cfg := range cfgs { var typeMeta metav1.TypeMeta
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Nov 03 08:41:32 UTC 2022 - 2.6K bytes - Viewed (0) -
pkg/test/util/yml/file.go
if err != nil { return } defer f.Close() filename = f.Name() _, err = f.WriteString(contents) return } func yamlToFilename(contents string) string { spl := SplitYamlByKind(contents) delete(spl, "") types := []string{} for k := range spl { types = append(types, k) } switch len(types) { case 0: return "empty" case 1: m := GetMetadata(contents)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Sep 07 14:33:54 UTC 2023 - 4.2K bytes - Viewed (0) -
tests/integration/telemetry/api/dashboard_test.go
// Apply just the grafana dashboards cfg, err := os.ReadFile(filepath.Join(env.IstioSrc, "samples/addons/grafana.yaml")) if err != nil { t.Fatal(err) } t.ConfigKube().YAML("istio-system", yml.SplitYamlByKind(string(cfg))["ConfigMap"]).ApplyOrFail(t) // We will send a bunch of requests until the test exits. This ensures we are continuously
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 12 20:46:28 UTC 2024 - 11.4K bytes - Viewed (0) -
pilot/pkg/xds/bench_test.go
inputYAML := buf.String() if _, err := os.Stat(extra); err == nil { bdata, err := os.ReadFile(extra) if err != nil { t.Fatal(err) } inputYAML += "\n---\n" + yml.SplitYamlByKind(string(bdata))[gvk.EnvoyFilter.Kind] } configs, badKinds, err := crd.ParseInputs(inputYAML) if err != nil { t.Fatalf("failed to read config: %v", err) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 22 18:13:40 UTC 2024 - 19.7K bytes - Viewed (0)