Fabriceli opened a new issue, #1655:
URL: https://github.com/apache/apisix-ingress-controller/issues/1655

   ### Current Behavior
   
   Create ApisixUpstream CRD with yaml file got error:
   ```sh
   2023-02-07T13:22:24+08:00       error   apisix/apisix_upstream.go:313   
failed to get service demo/backend-svc: service "backend-svc" not found
   2023-02-07T13:22:24+08:00       info    apisix/apisix_upstream.go:519   sync 
ApisixUpstream but not found, ignore       {"event_type": "add", 
"ApisixUpstream": 
{"Key":"demo/backend-svc","OldObject":null,"GroupVersion":"apisix.apache.org/v2"}}
   2023-02-07T13:22:24+08:00       warn    apisix/upstream.go:69   upstream not 
found      {"name": "demo_backend-svc_8078", "url": 
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams/1467bf14";,
 "cluster": "default"}
   2023-02-07T13:22:24+08:00       warn    types/types.go:212      upstream is 
not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin";, 
"upstream": "demo_backend-svc_8078"}
   ```
   
   ### Expected Behavior
   
   Get success
   
   ### Error Logs
   
   ```sh
   2023-02-07T13:22:24+08:00       error   apisix/apisix_upstream.go:313   
failed to get service demo/backend-svc: service "backend-svc" not found
   2023-02-07T13:22:24+08:00       info    apisix/apisix_upstream.go:519   sync 
ApisixUpstream but not found, ignore       {"event_type": "add", 
"ApisixUpstream": 
{"Key":"demo/backend-svc","OldObject":null,"GroupVersion":"apisix.apache.org/v2"}}
   2023-02-07T13:22:24+08:00       warn    apisix/upstream.go:69   upstream not 
found      {"name": "demo_backend-svc_8078", "url": 
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams/1467bf14";,
 "cluster": "default"}
   2023-02-07T13:22:24+08:00       warn    types/types.go:212      upstream is 
not referenced      {"cluster": "name=default; 
base_url=http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin";, 
"upstream": "demo_backend-svc_8078"}
   ```
   
   ### Steps to Reproduce
   
   1. `kubectl apply -f svc.yaml`
   ```yaml
   apiVersion: apisix.apache.org/v2
   kind: ApisixUpstream
   metadata:
     name: backend-svc
     namespace: demo
   spec:
     loadbalancer:
       type: ewma
   ---
   apiVersion: v1
   kind: Service
   metadata:
     name: backend-svc
     namespace: demo
   spec:
     type: ClusterIP
     selector:
       component: backend
     ports:
       - name: http
         port: 8078
         targetPort: 8078
   ---
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: backend
     namespace: demo
   spec:
     replicas: 1
     revisionHistoryLimit: 10
     selector:
       matchLabels:
         component: backend
     template:
       metadata:
         labels:
           component: backend
       spec:
         containers:
           - name: backend
             image: nginx:1.14.2
             ports:
               - name: http
                 containerPort: 8078
   ```
   2. check apisix-ingress-controller pod got error
   
   ### Environment
   
   - APISIX Ingress controller version (run `apisix-ingress-controller version 
--long`)
   1.6.0
   - Kubernetes cluster version (run `kubectl version`)
   ```sh
   Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.8", 
GitCommit:"fdc77503e954d1ee641c0e350481f7528e8d068b", GitTreeState:"clean", 
BuildDate:"2022-11-09T13:38:19Z", GoVersion:"go1.18.8", Compiler:"gc", 
Platform:"linux/amd64"}
   Kustomize Version: v4.5.4
   Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.9", 
GitCommit:"9710807c82740b9799453677c977758becf0acbb", GitTreeState:"clean", 
BuildDate:"2022-12-08T10:08:06Z", GoVersion:"go1.18.9", Compiler:"gc", 
Platform:"linux/amd64"}
   ```
   - OS version if running APISIX Ingress controller in a bare-metal 
environment (run `uname -a`)
   ```sh
   Linux metal-master1-sit 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 
17:07:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to