diff --git a/pkg/apis/backendconfig/v1/types.go b/pkg/apis/backendconfig/v1/types.go index 6cab072962..bdd335d123 100644 --- a/pkg/apis/backendconfig/v1/types.go +++ b/pkg/apis/backendconfig/v1/types.go @@ -110,6 +110,7 @@ type CacheKeyPolicy struct { } // SecurityPolicyConfig contains configuration for CloudArmor-enabled backends. +// +k8s:openapi-gen=true type SecurityPolicyConfig struct { // Name of the security policy that should be associated. Name string `json:"name"` diff --git a/pkg/apis/backendconfig/v1/zz_generated.openapi.go b/pkg/apis/backendconfig/v1/zz_generated.openapi.go index d82f241662..0e7f4aba4d 100644 --- a/pkg/apis/backendconfig/v1/zz_generated.openapi.go +++ b/pkg/apis/backendconfig/v1/zz_generated.openapi.go @@ -39,6 +39,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/ingress-gce/pkg/apis/backendconfig/v1.IAPConfig": schema_pkg_apis_backendconfig_v1_IAPConfig(ref), "k8s.io/ingress-gce/pkg/apis/backendconfig/v1.LogConfig": schema_pkg_apis_backendconfig_v1_LogConfig(ref), "k8s.io/ingress-gce/pkg/apis/backendconfig/v1.OAuthClientCredentials": schema_pkg_apis_backendconfig_v1_OAuthClientCredentials(ref), + "k8s.io/ingress-gce/pkg/apis/backendconfig/v1.SecurityPolicyConfig": schema_pkg_apis_backendconfig_v1_SecurityPolicyConfig(ref), "k8s.io/ingress-gce/pkg/apis/backendconfig/v1.SessionAffinityConfig": schema_pkg_apis_backendconfig_v1_SessionAffinityConfig(ref), } } @@ -434,6 +435,27 @@ func schema_pkg_apis_backendconfig_v1_OAuthClientCredentials(ref common.Referenc } } +func schema_pkg_apis_backendconfig_v1_SecurityPolicyConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecurityPolicyConfig contains configuration for CloudArmor-enabled backends.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the security policy that should be associated.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + func schema_pkg_apis_backendconfig_v1_SessionAffinityConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{