Comments (9)
The easiest (albeit ugly) fix for this problem would be to have a special case for "endpoint" in the create_entity method that sets the kind to "Endpoints".
from kubeclient.
- Have you opened an issue/discussion in k8s repo on this inconsistency? it's better to get this fixed on server side instead of each client's custom handling. cc @thockin
- What is your use case to manually create endpoints rather than use a selector and get them calculated and updated by the server?
Is this something like the below example, or different?
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/services.md#services-without-selectors
Thanks
cc @simon3z
from kubeclient.
@abonas Yes, we need the ability to create external services (services without selectors). Unfortunately, there's no way to declare the endpoints from within the service definition, so they must be declared manually.
I haven't opened an issue with the k8s developers about this...it's really a matter of semantics. When creating an endpoint entity type, you really do have the ability to create multiple "endpoints", which is why I guess they made it plural, although technically, you're only creating one endpoint entity type.
from kubeclient.
Yes, Endpoints objects are a set of individual IP endpoints. It's perhaps
an unfortunate name in the hidden double-pluralness - technically the REST
path should be "endpointses" I guess, but I don't think we're going to do
that.
I'd MAYBE be open to a better name, but that is a post-1.0 change, at
earliest.
As for defining endpoints for external services, we toyed with embedding an
Endpoints into Service as an alternative to Selector, but we just ran out
of time to explore it further.
On Tue, May 12, 2015 at 8:12 AM, stephenjlevy [email protected]
wrote:
@abonas https://github.com/abonas Yes, we need the ability to create
external services (services without selectors). Unfortunately, there's no
way to declare the endpoints from within the service definition, so they
must be declared manually.I haven't opened an issue with the k8s developers about this...it's really
a matter of semantics. When creating an endpoint entity type, you really do
have the ability to create multiple "endpoints", which is why I guess they
made it plural, although technically, you're only creating one endpoint
entity type.—
Reply to this email directly or view it on GitHub
#81 (comment).
from kubeclient.
@thockin we kind of worked in parallel :)
kubernetes/kubernetes#8115
from kubeclient.
@abonas so, how to be with Endpoints? I am not good in Ruby and I temporary created workaround like this:
khaliullov@4d328b0
but is so ugly.
from kubeclient.
@abonas so, how to be with Endpoints? I am not good in Ruby and I temporary created workaround like this:
khaliullov/kubeclient@4d328b0
but is so ugly.
Well, ideally it would have been fixed on server side so clients won't need workarounds.
However, given that it hasn't been addressed there yet, your solution seems correct, and I would suggest doing something like the below, just slightly more generic, that's all:
if entity_type.eql? 'Endpoint'
hash[:kind] = resource_name(entity_type)
else
hash[:kind] = entity_type
end
(tests addition is needed for endpoints to check that the url for various requests for creation/get/etc. is correct)
cc @simon3z
from kubeclient.
hash[:kind] = resource_name(entity_type)
@abonas we have to check if kind
is case-insensitive (and also if we don't care about inconsistencies) because resource_name
is downcasing the entity_type
.
Anyway, even though it looks ugly we have to fix this, so overall 👍
from kubeclient.
@abonas we have to check if kind is case-insensitive (and also if we don't care about inconsistencies) because resource_name is downcasing the entity_type.
@simon3z
as you suspected it is case sensitive. so needs to be capitalized. no big deal.
from kubeclient.
Related Issues (20)
- v4.11.0 was released but isn't noted in the CHANGELOG
- Informer.watch is not guaranteed to receive all changes during restart
- CVE-2022-44571 (High) detected in rack-2.2.3.gem - autoclosed HOT 1
- CVE-2022-44570 (High) detected in rack-2.2.3.gem - autoclosed HOT 1
- CVE-2023-22796 (High) detected in activesupport-7.0.2.3.gem - autoclosed HOT 1
- CVE-2022-44572 (High) detected in rack-2.2.3.gem - autoclosed HOT 1
- Word breaking fails for kind `APIService` HOT 1
- CVE-2023-27530 (High) detected in rack-3.0.4.1.gem - autoclosed HOT 1
- CVE-2023-27539 (Medium) detected in rack-3.0.4.1.gem - autoclosed HOT 1
- 6 tests fail KubeclientConfigTest#test_explicit_secure Expected false to be truthy. HOT 3
- Dependency Dashboard
- Is it possible to fetch ingress information? HOT 2
- getting large resources on slow connection is slow
- v5 first request is ~10x slower than v4
- CVE-2023-38037 (Medium) detected in activesupport-7.0.4.3.gem - autoclosed HOT 1
- CVE-2023-51774 (High) detected in json-jwt-1.15.3.gem - autoclosed HOT 1
- CVE-2024-25126 (Medium) detected in rack-3.0.7.gem - autoclosed HOT 1
- CVE-2024-26146 (Medium) detected in rack-3.0.7.gem - autoclosed HOT 1
- CVE-2024-26141 (Medium) detected in rack-3.0.7.gem - autoclosed HOT 1
- documentation doesn't match current Ruby gem exposed version(s) 4.11.0 HOT 1
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 kubeclient.