-
Notifications
You must be signed in to change notification settings - Fork 17
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
Kubernetes 1.10 #258
Conversation
1712e00
to
34d7dff
Compare
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These ones:
habitat-operator/hack/update-codegen.sh
Lines 20 to 28 in 3adc004
# 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
.circleci/config.yml
Outdated
command: minikube logs | ||
when: on_fail | ||
# NOTE: this relies on journalctl, which is not present on the version of | ||
# Ubuntu currenlty run by CircleCI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently
.circleci/config.yml
Outdated
# NOTE: this relies on journalctl, which is not present on the version of | ||
# Ubuntu currenlty run by CircleCI | ||
# - run: | ||
# - runame: print minikube logs |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
release-1.10
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
pkg/controller/v1beta1/controller.go
Outdated
@@ -167,11 +167,11 @@ func (hc *HabitatController) cacheHabitats() { | |||
} | |||
|
|||
func (hc *HabitatController) cacheDeployments() { | |||
source := newListWatchFromClientWithLabels( | |||
source := cache.NewFilteredListWatchFromClient( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
f904717
to
e0fbf17
Compare
PTALA. |
There was a problem hiding this 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.
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>
Clients are only supported 2 versions back, according to https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md#supported-releases-and-component-skew 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>
Good catch! |
e0fbf17
to
ecb3953
Compare
See #219 for things this changes.
Closes #219.
Closes #171.