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

[BUG] Can not remove the ending / in k8s manifest #520

Open
chuongnguyen5397 opened this issue Jan 16, 2023 · 2 comments
Open

[BUG] Can not remove the ending / in k8s manifest #520

chuongnguyen5397 opened this issue Jan 16, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@chuongnguyen5397
Copy link

Describe the bug
I'm using Kubernetes manifest to create Gateway Route

---
apiVersion: appmesh.k8s.aws/v1beta2
kind: GatewayRoute
metadata:
  name: service
  namespace: develop
spec:
  awsName: service
  httpRoute:
    match:
      prefix: /api/service/
      port: 80
    action:
      rewrite:
        prefix:
          defaultPrefix: DISABLED
      target:
        virtualService:
          virtualServiceRef:
            name: service

I want to remove the ending / at prefix /api/service/ in the manifest file but the CRDs does not allow me to do it. But I can remove it on Console but it keeps adding the / again.

Does anyone know how to get through this one?

Platform
EKS

Expected behavior
A clear and concise description of what you expected to happen.

Config files, and API responses
Here is the CRDs file that I'm using: kubectl apply -k "https://github.com/aws/eks-charts/stable/appmesh-controller/crds?ref=master"

@chuongnguyen5397 chuongnguyen5397 added the bug Something isn't working label Jan 16, 2023
@BennettJames
Copy link
Contributor

Hello,

I'm having trouble replicating the behavior. Can you please provide the following:

  • the version of the controller you have installed
  • the exact manifest file you are using
  • the output data that is incorrect

@chuongnguyen5397
Copy link
Author

Hi,

The controller's version is: appmesh-controller:v1.9.0

My manifest file to create Gateway Route:

apiVersion: appmesh.k8s.aws/v1beta2
kind: GatewayRoute
metadata:
  name: backend-service
  namespace: develop
  labels:
    gateway: ingress-gw
spec:
  awsName:backend-service
  httpRoute:
    match:
      prefix: /api/backend
      port: 8088
    action:
      rewrite:
        prefix:
          defaultPrefix: DISABLED
      target:
        virtualService:
          virtualServiceRef:
            name: backend-service

The error I got is here:

Error from server (Prefix to be matched on must start and end with '/'): error when applying patch:
{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"appmesh.k8s.aws/v1beta2\",.......

So what I have done to get through it here by created it manually in the console, and it worked without the /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants