You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "jianghushinian (via GitHub)" <gi...@apache.org> on 2024/02/01 02:15:56 UTC
[I] bug: create ApisixRoute failed by k8s dynamic client-go [apisix-ingress-controller]
jianghushinian opened a new issue, #2153:
URL: https://github.com/apache/apisix-ingress-controller/issues/2153
### Current Behavior
```go
func buildK8sApisixRoute(name, namespace string, port int32) *apisixv2.ApisixRoute {
return &apisixv2.ApisixRoute{
TypeMeta: metav1.TypeMeta{
APIVersion: "apisix.apache.org/v2",
Kind: "ApisixRoute",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
},
Spec: apisixv2.ApisixRouteSpec{
HTTP: []apisixv2.ApisixRouteHTTP{
{
Name: name,
Match: apisixv2.ApisixRouteHTTPMatch{
Hosts: []string{"xxx"},
Paths: []string{"/*"},
},
Backends: []apisixv2.ApisixRouteHTTPBackend{
{
ServiceName: name,
ServicePort: intstr.IntOrString{
Type: intstr.Int,
IntVal: port,
},
},
},
Authentication: apisixv2.ApisixRouteAuthentication{
Enable: false,
Type: "basicAuth",
},
},
},
},
}
}
```
### Expected Behavior
success
### Error Logs
```
ApisixRoute.apisix.apache.org "demo" is invalid: spec.http[0].authentication.type: Unsupported value: "": supported values: "basicAuth", "keyAuth", "jwtAuth", "wolfRBAC", "hmacAuth", "ldapAuth"
```
### Steps to Reproduce
1. create apisixroutes cr
2. failed
### Environment
- APISIX Ingress controller version (run `apisix-ingress-controller version --long`)
- Kubernetes cluster version (run `kubectl version`)
- OS version if running APISIX Ingress controller in a bare-metal environment (run `uname -a`)
--
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: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: create ApisixRoute failed by k8s dynamic client-go [apisix-ingress-controller]
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #2153:
URL: https://github.com/apache/apisix-ingress-controller/issues/2153#issuecomment-1920698336
@acuteaura I think the change is meaningful enough that we can introduce it even if it is breaking. Replacing these fields as pointers looks good to me. The consumers should be able to upgrade to newer version with code changes. @AlinsRan What do you think?
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: create ApisixRoute failed by k8s dynamic client-go [apisix-ingress-controller]
Posted by "acuteaura (via GitHub)" <gi...@apache.org>.
acuteaura commented on issue #2153:
URL: https://github.com/apache/apisix-ingress-controller/issues/2153#issuecomment-1920611751
There's a lot more of these that have `omitempty` but can can't marshall from Go as nil values. Would suggest we fix these in a big swoop since it breaks other library API consumers.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: create ApisixRoute failed by k8s dynamic client-go [apisix-ingress-controller]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #2153: bug: create ApisixRoute failed by k8s dynamic client-go
URL: https://github.com/apache/apisix-ingress-controller/issues/2153
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: create ApisixRoute failed by k8s dynamic client-go [apisix-ingress-controller]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2153:
URL: https://github.com/apache/apisix-ingress-controller/issues/2153#issuecomment-2323104728
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: create ApisixRoute failed by k8s dynamic client-go [apisix-ingress-controller]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2153:
URL: https://github.com/apache/apisix-ingress-controller/issues/2153#issuecomment-2089376189
This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: create ApisixRoute failed by k8s dynamic client-go [apisix-ingress-controller]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2153:
URL: https://github.com/apache/apisix-ingress-controller/issues/2153#issuecomment-2261766211
This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: create ApisixRoute failed by k8s dynamic client-go [apisix-ingress-controller]
Posted by "jianghushinian (via GitHub)" <gi...@apache.org>.
jianghushinian commented on issue #2153:
URL: https://github.com/apache/apisix-ingress-controller/issues/2153#issuecomment-1920369570
if wrote:
```go
func buildK8sApisixRoute(name, namespace string, port int32) *apisixv2.ApisixRoute {
return &apisixv2.ApisixRoute{
TypeMeta: metav1.TypeMeta{
APIVersion: "apisix.apache.org/v2",
Kind: "ApisixRoute",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
},
Spec: apisixv2.ApisixRouteSpec{
HTTP: []apisixv2.ApisixRouteHTTP{
{
Name: name,
Match: apisixv2.ApisixRouteHTTPMatch{
Hosts: []string{fmt.Sprintf("%s.%s", name, config.GlobalConfig.Apisix.Endpoint)},
Paths: []string{"/*"},
},
Backends: []apisixv2.ApisixRouteHTTPBackend{
{
ServiceName: name,
ServicePort: intstr.IntOrString{
Type: intstr.Int,
IntVal: port,
},
},
},
Authentication: apisixv2.ApisixRouteAuthentication{
Enable: false,
Type: "basicAuth",
},
},
},
},
}
}
```
will success.
the following code is necessary, but useless, if we should use pointers to avoid mandatory parameters?
```go
Authentication: apisixv2.ApisixRouteAuthentication{
Enable: false,
Type: "basicAuth",
}
```
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: create ApisixRoute failed by k8s dynamic client-go [apisix-ingress-controller]
Posted by "pottekkat (via GitHub)" <gi...@apache.org>.
pottekkat commented on issue #2153:
URL: https://github.com/apache/apisix-ingress-controller/issues/2153#issuecomment-2089430972
@Revolyssup removing the stale label. Please check and triage.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org