Comments (3)
@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?
from apisix-ingress-controller.
if wrote:
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",
},
},
},
},
}
}
will success.
the following code is necessary, but useless, if we should use pointers to avoid mandatory parameters?
Authentication: apisixv2.ApisixRouteAuthentication{
Enable: false,
Type: "basicAuth",
}
from apisix-ingress-controller.
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 (being mindful of possible NPE) since it breaks other library API consumers.
from apisix-ingress-controller.
Related Issues (20)
- feat: Is it possible to make the ingress controller work without allowing read access to all secrets in the cluster? HOT 3
- request help: How to start multiple unrelated ingress-apisix-composite-deployment to load traffic from different sources HOT 9
- bug: CVE-2023-48795 Vulnerability
- request help: Chinese document plan
- bug: library etcd-adapter fixed a concurrent issue, need upgrade dependency mod version HOT 1
- bug: support skip_mtls_uri_regex for CRD kind: ApisixTls HOT 1
- help request: Apisix 3.8.0 version - ingress controller deployment issue HOT 1
- request help: large file upload not work HOT 2
- dependencies: update etcd-adapter version to latest
- bug: plugin config "concurrent map writes" HOT 1
- feat: As a user, I want to configure ApisixRoute with the multi-auth plugin, so that my service can support multiple authentication methods per route HOT 1
- feat: As a user, I want to configure External services using Kubernetes Ingress without CRD's HOT 2
- help request: Not able to use custom plugin with composite architecture approach HOT 6
- feat: can apisix-ingress-controller use plugin without apisix HOT 1
- bug: Upstream HealthCheck Issue - Unhealthy Upstream doesn't be excluded temporarily HOT 39
- request help: Question - When I change the Upstream from Kubernetes environment to Admin API
- feat: as a user, I want all event to be processed when apisix-ingress-controller recovered
- bug: Some headers are not supported in the response-rewrite plugin HOT 1
- Ability to set Plugin Priorities
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apisix-ingress-controller.