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

request help: upstream and route not created using argocd #2323

Closed
rizalalfarizi123 opened this issue Nov 15, 2024 · 2 comments
Closed

request help: upstream and route not created using argocd #2323

rizalalfarizi123 opened this issue Nov 15, 2024 · 2 comments

Comments

@rizalalfarizi123
Copy link

rizalalfarizi123 commented Nov 15, 2024

Issue description

i have two apisix resource, route and upstream

# upstream.yaml
apiVersion: apisix.apache.org/v2
kind: ApisixUpstream
metadata:
  name: finance-service-upstream
spec:
  externalNodes:
  - type: Service
    name: finance-service

and

apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
  name: finance-service-route
spec:
  http:
    - name: get-sales-units-records-route
      match:
        paths:
        - /api/v1/system-configurations/sales-units/records
        methods:
        - GET
      upstreams:
      - name: finance-service-upstream

after sync with argo, i got error

upstream:
ApisixIngress synced failed, with error: upstream doesn't exist. It will be created after ApisixRoute is created referencing it.
route:
ApisixIngress synced failed, with error: 1 error occurred: * unexpected status code 400; error message: {"error_msg":"failed to fetch upstream info by upstream id [8cd0a3a0], response code: 404"}

this is my kustomize resource order

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../applications/finance-service/
- ./route-list.yaml
- ./route-upstream.yaml

commonLabels:
  env: development

patches:
- path: ./patches/deployment.yaml

namespace of all resource are the same
namespace for apisix is: platform

i read that upstream will be created if we reference it in route, but i doesn't work with me

Environment

  • your apisix-ingress-controller version (output of apisix-ingress-controller version --long): 1.8.2
  • your Kubernetes cluster version (output of kubectl version):
  • if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
@rizalalfarizi123
Copy link
Author

i've solved this issue, it's because my service is not ExternalName type

@javier-ruiz-voxsmart
Copy link

@rizalalfarizi123 what do you mean when you say "my service is not ExternalName type"?
I'm having errors configuring my ApisixUpstream object and this may help finding the solution.

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

No branches or pull requests

2 participants