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

Read BoundPods from etcd instead of ContainerManifestList #1662

Closed
wants to merge 3 commits into from

Conversation

smarterclayton
Copy link
Contributor

There are three values that uniquely identify a pod on a host - the configuration source (etcd, file, http), the pod name, and the pod namespace. This change ensures that configuration properly makes those
names unique by changing podFullName to contain both name (currently ID in v1beta1, Name in v1beta3) and namespace.

The Kubelet does not properly handle information requests for pods not in the default namespace at this time.

When complete, this will represent a breaking schema change for etcd. Only the last commit two commits are new, the others are covered.

Extracted from #1600

@smarterclayton
Copy link
Contributor Author

@thockin you may want to take a peek at this prior to it being complete

@smarterclayton
Copy link
Contributor Author

Special note: I made use of Annotations to distinguish config sources (see pkg/kubelet/types.go), may need review for name-spacing implications of properties we set.

@smarterclayton smarterclayton mentioned this pull request Oct 9, 2014
20 tasks
@smarterclayton
Copy link
Contributor Author

@thockin I'm contemplating changing the registry key from /registry/host/<machine>/kubelet to something like /registry/node/<machine>/pods - thoughts?

@smarterclayton smarterclayton changed the title WIP - Read BoundPods from etcd instead of ContainerManifestList Read BoundPods from etcd instead of ContainerManifestList Oct 9, 2014
@smarterclayton
Copy link
Contributor Author

@thockin ready for review

@smarterclayton
Copy link
Contributor Author

Rebased

@thockin
Copy link
Member

thockin commented Oct 14, 2014

Sorry - busy week. On it now.

out.Spec.Containers = in.Containers
out.Spec.Volumes = in.Volumes
out.Spec.RestartPolicy = in.RestartPolicy
out.ID = in.ID
Copy link
Member

Choose a reason for hiding this comment

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

Maybe I totally missed something - how did we end up with ID and UID at the same time? Or is this just transient? I'm assuming it's just transient?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just transient - I won't rename ID -> Name until after this happens.

----- Original Message -----

"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"

)

// Codec is the identity codec for this package - it can only convert
itself
// to itself.
var Codec = runtime.CodecFor(Scheme, "")
+
+func init() {

  • Scheme.AddConversionFuncs(
  •   // Convert ContainerManifest to BoundPod
    
  •   func(in *ContainerManifest, out *BoundPod, s conversion.Scope) error {
    
  •       out.Spec.Containers = in.Containers
    
  •       out.Spec.Volumes = in.Volumes
    
  •       out.Spec.RestartPolicy = in.RestartPolicy
    
  •       out.ID = in.ID
    

Maybe I totally missed something - how did we end up with ID and UID at the
same time? Or is this just transient? I'm assuming it's just transient?


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

@thockin
Copy link
Member

thockin commented Oct 14, 2014

Annotation: I think what you did is consistent with what we want. However - do we need the annotation, or is it speculative?

Registry key change: SGTM

Otherwise my nits are pretty minor. Since I haven't been paying attention to the in-progress transmogrification, I can only assume that ID will become Name at some point?

@smarterclayton
Copy link
Contributor Author

----- Original Message -----

Annotation: I think what you did is consistent with what we want. However -
do we need the annotation, or is it speculative?

We at a minimum have to identify three unique attributes on each pod - name, namespace, and source of config, and a pod must be unique across all of those (so that you can't have a file source that stomps an apiserver source). It felt more correct to separate those three than to attempt to combine source and namespace and lose the original attribution. Adding values to the end of the BoundPod Namespace attribute felt wrong because that represented a namespace on the server, not a namespace on the Kubelet.

Registry key change: SGTM

Will make that change.

Otherwise my nits are pretty minor. Since I haven't been paying attention to
the in-progress transmogrification, I can only assume that ID will become
Name at some point?

Yes, that's tracked in #1519 and #1600 - this is the last of prereq changes to reduce the scope of #1600.


Reply to this email directly or view it on GitHub:
#1662 (comment)

@smarterclayton
Copy link
Contributor Author

Rebased, renamed the etcd path. Open question on file names and whether we should be enforcing new pattern, old pattern, or redecide.

@thockin
Copy link
Member

thockin commented Oct 15, 2014

Open question re: "" vs "default.

For filenames I opened a new issue.

Re: annotations, I am not too worried about files and etcd colliding, though I guess they could. Files will be more tightly controlled than random namespaces, anyway, I presume. Either way this is fine, I was just asking.

@smarterclayton
Copy link
Contributor Author

I renamed the file, still waiting on closure of namespace

There are three values that uniquely identify a pod on a host -
the configuration source (etcd, file, http), the pod name, and the
pod namespace. This change ensures that configuration properly
makes those names unique by changing podFullName to contain both
name (currently ID in v1beta1, Name in v1beta3) and namespace.

The Kubelet does not properly handle information requests for
pods not in the default namespace at this time.
Rename ManifestFactory -> BoundPodFactory and change the general structure
of the call to focus on BoundPod.
@smarterclayton
Copy link
Contributor Author

Rebased and fixed conflict with another pull, namespace has been punted on and I believe this is ready to merge at @thockin's pleasure on break day.

@thockin
Copy link
Member

thockin commented Oct 15, 2014

I declare breakage day to be tomorrow. I will merge PRs and watch travis
and jenkins.

On Wed, Oct 15, 2014 at 2:41 PM, Clayton Coleman notifications@github.com
wrote:

Rebased and fixed conflict with another pull, namespace has been punted on
and I believe this is ready to merge at @thockin
https://github.com/thockin's pleasure on break day.

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

@smarterclayton
Copy link
Contributor Author

Set a time so I can clear my schedule for abuse

----- Original Message -----

I declare breakage day to be tomorrow. I will merge PRs and watch travis
and jenkins.

On Wed, Oct 15, 2014 at 2:41 PM, Clayton Coleman notifications@github.com
wrote:

Rebased and fixed conflict with another pull, namespace has been punted on
and I believe this is ready to merge at @thockin
https://github.com/thockin's pleasure on break day.

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


Reply to this email directly or view it on GitHub:
#1662 (comment)

@thockin
Copy link
Member

thockin commented Oct 15, 2014

I'm hoping for 10:00 am here. Tying off last nits on my PR.

On Wed, Oct 15, 2014 at 2:44 PM, Clayton Coleman notifications@github.com
wrote:

Set a time so I can clear my schedule for abuse

----- Original Message -----

I declare breakage day to be tomorrow. I will merge PRs and watch travis
and jenkins.

On Wed, Oct 15, 2014 at 2:41 PM, Clayton Coleman <
notifications@github.com>
wrote:

Rebased and fixed conflict with another pull, namespace has been
punted on
and I believe this is ready to merge at @thockin
https://github.com/thockin's pleasure on break day.

Reply to this email directly or view it on GitHub
<
#1662 (comment)

.


Reply to this email directly or view it on GitHub:

#1662 (comment)

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

@eparis
Copy link
Contributor

eparis commented Oct 16, 2014

I opened #1840 which is just a rebase of this on top of Services v2 and namespaces. One minor conflict. Passed Travis. running e2e against that rebase...

@thockin
Copy link
Member

thockin commented Oct 16, 2014

Replaced by #1840

@thockin thockin closed this Oct 16, 2014
soltysh pushed a commit to soltysh/kubernetes that referenced this pull request Aug 21, 2023
…erry-pick-1657-to-release-4.12

[release-4.12] OCPBUGS-17159: Increase service idle max timeout to 100 minutes
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.

3 participants