INNER CODE UNIT · Go

marshalCRDManifest

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

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 {
		jsonProps := props[name]
		p := gatewayTweaks(channel, name, jsonProps)
		if p == nil {
			delete(props, name)
		} else {
			props[name] = *p
		}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…