F5Networks / k8s-bigip-ctlr

Repository for F5 Container Ingress Services for Kubernetes & OpenShift.
Apache License 2.0
364 stars 195 forks source link

[CRD] invalid property name monitors #3575

Closed nansenat16 closed 1 month ago

nansenat16 commented 1 month ago

Setup Details

CIS Version : 2.18.0 Build: f5networks/k8s-bigip-ctlr:2.18.0
BIGIP Version: Big IP 17.1.1.3-0.0.5 AS3 Version: 3.52.0-5 Agent Mode: AS3
Orchestration: K8S
Orchestration Version: k3s-1.30.4 Pool Mode: Cluster
Additional Setup details: vxlan flannel

Description

Steps To Reproduce

1) Deploy CRD

kubectl create -f https://raw.githubusercontent.com/F5Networks/k8s-bigip-ctlr/v2.18.0/docs/config_examples/customResourceDefinitions/customresourcedefinitions.yml

2) Deploy VS

apiVersion: "cis.f5.com/v1"
kind: VirtualServer
metadata:
  name: nginx-service-virtual-server
  labels:
    f5cr: "true"
spec:
  virtualServerAddress: "10.9.55.34"
  waf: /Common/nginx_test
  pools:
  - path: /
    service: nginx-service
    servicePort: 80
    monitors:
    - type: http
      name: /Common/http
      send: /
      interval: 5
      timeout: 10
  serviceAddress:
  - icmpEcho: "enable"
    arpEnabled: true
    routeAdvertisement: "all"

3) Check logs for error

Expected Result

Able to deploy VS CRD

Actual Result


2024/09/26 03:23:07 [DEBUG] [AS3] Raw response from Big-IP: map[code:422 declarationId:urn:uuid:85626792-9ee7-46bb-8fc8-4ba708cfdc1d errors:[/k3s/Shared: propertyName "/Common/http" should match pattern "^[A-Za-z]([0-9A-Za-z_.-]{0,188}[0-9A-Za-z_.])?$"] host:localhost message:declaration is invalid tenant:[k3s]] 
2024/09/26 03:23:07 [DEBUG] [AS3] Posting failed tenants configuration in 30s seconds

Observations (if any)

CRD rule not match AS3

^\/[a-zA-Z]+([A-z0-9-_+]+\/)+([-A-z0-9_.:]+\/?)*$
vklohiya commented 1 month ago

@nansenat16 , If you want to reference existing monitors define the monitors as follows:

    monitors:
        - name: /Common/http
          reference: bigip