INNER CODE UNIT · Go

writeVAPManifest

kubernetes-sigs/gateway-api · tools/generator/main.go:255

func writeVAPManifest(path, manifest string) error {
	if err := os.WriteFile(path, []byte(manifest), 0o600); err != nil { // #nosec G703 -- path is derived from a hardcoded channel list
		return fmt.Errorf("failed to write VAP manifest %s: %w", path, err)
	}
	return nil
}

func marshalCRDManifest(customResourceDefinition apiext.CustomResourceDefinition) ([]byte, error) {
	manifest := customResourceDefinitionManifest{
		TypeMeta:   customResourceDefinition.TypeMeta,
		ObjectMeta: customResourceDefinition.ObjectMeta,
		Spec:       customResourceDefinition.Spec,
	}
	return yaml.Marshal(manifest)
}

func gatewayTweaksMap(channel string, props map[string]apiext.JSONSchemaProps) map[string]apiext.JSONSchemaProps {
	for name := range props {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…