Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authpolicy and rewritepolicy can't be named with "-" symbol #547

Open
vintury opened this issue Jul 25, 2022 · 2 comments
Open

authpolicy and rewritepolicy can't be named with "-" symbol #547

vintury opened this issue Jul 25, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@vintury
Copy link
Contributor

vintury commented Jul 25, 2022

Describe the bug
authpolicy and rewritepolicy can't be named with "-" symbol.
If you use the "-" character for the metadata.name field, then there will be an error in the CIC logs.

Kubernetes require use "-" and "." symbols for fields metadata.name:
metadata.name: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

To Reproduce

  1. create auth policy named as:
apiVersion: citrix.com/v1beta1
kind: authpolicy
metadata:
  name: "consul-authpolicy"
spec:
    servicenames:
    - consul-ui

Look the logs of cic:
kubectl -n citrix logs cic-citrix-ingress-controller-7b5c44f65f-28xdg cic| grep ERROR
2. Version of the Citrix Ingress Controller: 1.26.7
3. Version of VPX NS13.0: Build 85.19.nc

Expected behavior
I want to create policy name by RFC 1123 with "-" and "." symbols.

Logs

2022-07-25 11:26:45,970  - ERROR - [rewritepolicy.py:validate_add:158] (MainThread) CRD name zzz-main can't contain "-"
2022-07-25 11:26:45,979  - ERROR - [customresourcecontroller.py:sync_existing_crd_instances_per_kind:358] (MainThread) FAILURE: VALIDATION because "CRD name smppsim-main can't contain "-"" during sync of existing crd zzz-main.dev-xxx of kind rewritepolicy

2022-07-25 11:27:05,587  - ERROR - [authpolicy.py:validate_add:136] (MainThread) CRD name consul-authpolicy can't contain "-"
2022-07-25 11:27:05,598  - ERROR - [customresourcecontroller.py:event_handler:214] (MainThread) FAILURE: VALIDATION because "CRD name consul-authpolicy can't contain "-"" while handling event for crd consul-authpolicy.dev-xxx of kind authpolicy
@aroraharsh23
Copy link
Contributor

@vintury There were some internal constraints, due to which "-" was not allowed in naming. We are analysing again, if we can remove this restriction.

@ankits123 ankits123 self-assigned this Aug 10, 2022
@vintury
Copy link
Contributor Author

vintury commented Feb 19, 2023

Hello. Any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants