Skip to content

Creation of SecurityPolicy with targetSelectors fails #3901

@sadovnikov

Description

@sadovnikov

Description:

Creation of SecurityPolicy with targetSelectors only fails with the either targetRef or targetRefs must be used message

Repro steps:

Create SecurityPolicy below

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
  labels:
    eg/namespace: reference-apps
  name: eg-fallback-oidc
  namespace: reference-apps
spec:
  oidc:
    clientID: xxxxxxxxxx
    clientSecret:
      name: oauth2-secret
    provider:
      issuer: >-
        https://login.microsoftonline.com/xxxxxxxxxx/v2.0
    scopes:
      - 'api://xxxxxxxxxx/oidc'
      - offline_access
  targetSelectors:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      matchLabels:
        eg/namespace: reference-apps

Environment:

Version v1.1.0-rc.1, installed with the helm chart

dependencies:
- name: gateway-helm
  version: v1.1.0-rc.1
  repository: oci://docker.io/envoyproxy

It must be coming from the x-kubernetes-validation.

These CRDS are in the generated directory and I'm failing to find their source to fix the bug

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions