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

[WIP] - Standardize identifier behavior across apiserver #253

Conversation

smarterclayton
Copy link
Contributor

Depends on #321

@@ -57,6 +57,7 @@ type EnvVar struct {

// Container represents a single container that is expected to be run on the host.
type Container struct {
ID string `yaml:"id,omitempty" json:"id,omitempty"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a fan of having both Name and ID. Very confusing. Not sure if there's an alternative. :/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, what if we required container's name field, and generate a unique ID for the pod/manifest, and then have kubelet combine them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems much cleaner to me - reject containers with the same name in the pod and ensure pod ID exists or generate it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my email from this evening discussing. I'm concerned that there
are a lot of forked efforts here, and I want to make sure we don't step on
each other or accept a solution we don't like because it happens to be
implemented :)

On Wed, Jun 25, 2014 at 8:34 PM, Clayton Coleman notifications@github.com
wrote:

In pkg/api/types.go:

@@ -57,6 +57,7 @@ type EnvVar struct {

// Container represents a single container that is expected to be run on the host.
type Container struct {

  • ID string yaml:"id,omitempty" json:"id,omitempty"
    Name string yaml:"name,omitempty" json:"name,omitempty"

That seems much cleaner to me - reject containers with the same name in
the pod and ensure pod ID exists or generate it.

Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/kubernetes/pull/253/files#r14224118
.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that a container within a manifest needs an ID since I think we can assume (and enforce) that name be unique within the manifest. My work on IDs was mostly internal cleanup and still maintaining the the docker name as mangle(manifest.id, container.name)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree - containers withing a pod should only need a name.

@lavalamp
Copy link
Member

@jjhuff is working on fixing up the kubelet's container naming scheme, which is the other half of this. See: jjhuff@ff131a9

@jjhuff
Copy link
Contributor

jjhuff commented Jun 26, 2014

My internal Id cleanup is in #254

@smarterclayton
Copy link
Contributor Author

Would like to include on top of #280

@smarterclayton smarterclayton changed the title [WIP] - #199 Add container ID [WIP] - Normalize and standardize identifier behavior across apiserver Jun 30, 2014
@smarterclayton smarterclayton changed the title [WIP] - Normalize and standardize identifier behavior across apiserver [WIP] - Standardize identifier behavior across apiserver Jun 30, 2014
@smarterclayton
Copy link
Contributor Author

Currently I'm using full UUID - in practice and for readability I could drop it down to 64 bits and then do a base64 (omitting - and _). That would make generated ids immediately more human readable from the apiserver and kubelet, at the risk of moving to a 1 in 10 million chance of a collision with ~5 million containers.

@thockin
Copy link
Member

thockin commented Jul 1, 2014

Are you ready for a thorough review on this one?

On Tue, Jul 1, 2014 at 7:50 AM, Clayton Coleman notifications@github.com
wrote:

Currently I'm using full UUID - in practice and for readability I could
drop it down to 64 bits and then do a base64 (omitting - and _). That would
make generated ids immediately more human readable from the apiserver and
kubelet, at the risk of moving to a 1 in 10 million chance of a collision
with ~5 million containers.

Reply to this email directly or view it on GitHub
#253 (comment)
.

@smarterclayton
Copy link
Contributor Author

General approach and uuid type (full uuid vs shorter random segment) would be helpful

@thockin
Copy link
Member

thockin commented Jul 1, 2014

It would help a lot for review if you sent a PR just for the Id -> ID change

On Tue, Jul 1, 2014 at 9:59 AM, Clayton Coleman notifications@github.com
wrote:

General approach and uuid type (full uuid vs shorter random segment) would
be helpful

Reply to this email directly or view it on GitHub
#253 (comment)
.

@smarterclayton
Copy link
Contributor Author

Done

@thockin
Copy link
Member

thockin commented Jul 1, 2014

Directionally good.

On Tue, Jul 1, 2014 at 10:18 AM, Clayton Coleman notifications@github.com
wrote:

Done

Reply to this email directly or view it on GitHub
#253 (comment)
.

@smarterclayton smarterclayton deleted the fix_199_add_container_uuid branch July 2, 2014 22:40
@smarterclayton smarterclayton restored the fix_199_add_container_uuid branch July 2, 2014 22:45
@smarterclayton smarterclayton deleted the fix_199_add_container_uuid branch July 2, 2014 22:45
vishh added a commit to vishh/kubernetes that referenced this pull request Apr 6, 2016
keontang pushed a commit to keontang/kubernetes that referenced this pull request May 14, 2016
change the grafana image and add our new monitoring job to the monitoring addon.
keontang pushed a commit to keontang/kubernetes that referenced this pull request Jul 1, 2016
change the grafana image and add our new monitoring job to the monitoring addon.
harryge00 pushed a commit to harryge00/kubernetes that referenced this pull request Aug 11, 2016
change the grafana image and add our new monitoring job to the monitoring addon.
mqliang pushed a commit to mqliang/kubernetes that referenced this pull request Dec 8, 2016
change the grafana image and add our new monitoring job to the monitoring addon.
mqliang pushed a commit to mqliang/kubernetes that referenced this pull request Mar 3, 2017
change the grafana image and add our new monitoring job to the monitoring addon.
wking pushed a commit to wking/kubernetes that referenced this pull request Jul 21, 2020
linxiulei pushed a commit to linxiulei/kubernetes that referenced this pull request Jan 18, 2024
Empty LogPath will use journald's default path.
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

Successfully merging this pull request may close these issues.

4 participants