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

Kubernetes 1.10 #258

Merged
merged 17 commits into from
May 7, 2018
Merged

Conversation

asymmetric
Copy link
Contributor

See #219 for things this changes.

Closes #219.
Closes #171.

Copy link
Contributor

@krnowak krnowak left a comment

Choose a reason for hiding this comment

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

Looks mostly fine I suppose, but thought that we are going to make v1beta3 custom version for the v1beta2 statefulsets. But maybe it will not be required, as supposedly you should be able to create a v1beta1 statefulset and handle it as v1beta2 statefulset.

- run:
name: code-gen script
environment:
CODEGEN_PKG: ../../../../src/k8s.io/code-generator
CODEGEN_VERSION: release-1.9
CODEGEN_VERSION: kubernetes-1.10.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be release-1.10?

Whatever outcome is (either a tag or a branch), we should keep docs in the update codegen script in sync.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The release- are branches, i.e. they get updated, so we cannot guarantee that it will always be the same commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What docs are you referring to?

Copy link
Contributor

Choose a reason for hiding this comment

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

These ones:

# First of all, the code-generator needs to be fetched:
# $ go get -u k8s.io/code-generator
#
# Now checkout the appropriate branch for the Kubernetes version that
# you're building for. For example if you're building for Kubernetes
# 1.10.0 you would checkout the `release-1.10` branch.
#
# Then run this from the repo's root with:
# $ CODEGEN_PKG=../../../k8s.io/code-generator hack/update-codegen.sh

name: print minikube logs
command: minikube logs
when: on_fail
# NOTE: this relies on journalctl, which is not present on the version of
Copy link
Contributor

Choose a reason for hiding this comment

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

So how did it work before? Old minikube/k8s didn't require journalctl?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Old minikube didn't use journalctl.

command: minikube logs
when: on_fail
# NOTE: this relies on journalctl, which is not present on the version of
# Ubuntu currenlty run by CircleCI
Copy link
Contributor

Choose a reason for hiding this comment

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

currently

# NOTE: this relies on journalctl, which is not present on the version of
# Ubuntu currenlty run by CircleCI
# - run:
# - runame: print minikube logs
Copy link
Contributor

Choose a reason for hiding this comment

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

runame rucommand and ruwhen?

- CODEGEN_VERSION=release-1.9
- K8S_VERSION=v1.10.0
- MINIKUBE_VERSION=v0.26.1
- CODEGEN_VERSION=kubernetes-1.10.0
Copy link
Contributor

Choose a reason for hiding this comment

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

release-1.10?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above

@@ -167,11 +167,11 @@ func (hc *HabitatController) cacheHabitats() {
}

func (hc *HabitatController) cacheDeployments() {
source := newListWatchFromClientWithLabels(
source := cache.NewFilteredListWatchFromClient(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we touch this code at all? v1beta1 custom version is frozen.

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's true, OTOH it should be a drop-in replacement. Not sure, should I remove?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I'd just leave it alone.

@@ -548,11 +548,11 @@ func (hc *HabitatController) conform(key string) error {
}

// Create StatefulSet, if it doesn't already exist.
if _, err := hc.config.KubernetesClientset.AppsV1beta1().StatefulSets(h.Namespace).Create(sts); err != nil {
if _, err := hc.config.KubernetesClientset.AppsV1beta2().StatefulSets(h.Namespace).Create(sts); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably should be a part of v1beta3 custom version, no? But maybe releasing v1beta3 will not be required, as supposedly you should be able to create a v1beta1 statefulset and handle it as v1beta2 statefulset. Maybe same goes for caching and so on. Could you check it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I've:

  • Started a 1.10 cluster
  • Run the operator (out of cluster) on master (meaning, sts v1beta1 controller)
  • Created the standalone example
  • Killed the operator
  • Checked out this branch
  • Started the operator
  • Edited the Habitat manifest

The updates were picked up by the operator.

So the v1beta1 resource is delivered to the v1beta2 watcher. So we don't need to upgrade to v1beta3 for this change.

@asymmetric asymmetric force-pushed the asymmetric/1.10 branch 2 times, most recently from f904717 to e0fbf17 Compare May 2, 2018 10:31
@asymmetric
Copy link
Contributor Author

PTALA.

Copy link
Contributor

@krnowak krnowak left a comment

Choose a reason for hiding this comment

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

LFAD in general, but we probably want sign-offs in all the commits, no? Some initial commits seem to lack it.

asymmetric and others added 17 commits May 7, 2018 12:11
Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
The default is `kubeadm`, which requires systemd, which is not present
on Trusty, which is what's used by both CircleCI and Travis.

This change should be reverted once this issue is fixed: kubernetes/minikube#2704

Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
* client-go v7.0.0
* Kubernetes v10.0.0

Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
In v1beta2, this is the default

Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
The `NewFilteredListWatchFromClient` function introduced in client-go
v7.0.0 allows us to filter based on custom fields/labels, therefore we
don't need our custom implementation of this functionality.

The function was introduced
[here](kubernetes/kubernetes#57508)

Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
It's added by the generator itself now.

Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Not supported in Ubuntu 14.04.

Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Before `apps/v1beta2`, labels were added to resources
automatically. Now we have to do it ourselves, to make sure that we can
find the Habitat from the sub-resource.

See https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.8.md#behavioral-changes

Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
To mention that a tag should be checked-out, rather than a branch.

Signed-off-by: Lorenzo Manacorda <lorenzo@kinvolk.io>
@asymmetric
Copy link
Contributor Author

Good catch! git rebase --signoff master did the trick.

@asymmetric asymmetric merged commit c74e15a into habitat-sh:master May 7, 2018
@asymmetric asymmetric deleted the asymmetric/1.10 branch May 7, 2018 10:32
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.

2 participants