Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

Fixup goclient upgrade #89

Merged
merged 2 commits into from
Jan 3, 2018
Merged

Fixup goclient upgrade #89

merged 2 commits into from
Jan 3, 2018

Conversation

bethge
Copy link
Contributor

@bethge bethge commented Dec 27, 2017

@rebuy-de/prp-kubernetes-deployment - PTAL

Some of the capabilities for decoding manifests have moved to client-go/kubernetes/schema.

Separated app.Render for easier testability of scheme.Codecs.UniversalDeserializer().Decode().

pkg/api/render_test.go is not pretty. On the upside: no added file i/o in the "unit test". Very much open to suggestions.

See:

@bethge bethge force-pushed the fixup-goclient-upgrade branch 2 times, most recently from 99440a0 to 40dc349 Compare December 27, 2017 17:15
octopusx
octopusx previously approved these changes Dec 27, 2017

func TestDecode(t *testing.T) {
tcs := map[string]string{
"podpreset.yaml": `
Copy link
Member

Choose a reason for hiding this comment

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

I would put this into an actual file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -8,7 +8,7 @@ import (
"github.com/rebuy-de/kubernetes-deployment/pkg/templates"
log "github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/kubernetes/scheme"
Copy link
Member

Choose a reason for hiding this comment

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

Such stable APU. Much wow.

Copy link
Member

Choose a reason for hiding this comment

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

Can you check if this is still required:

import (
_ "k8s.io/client-go/pkg/api/install"
_ "k8s.io/client-go/pkg/apis/apps/install"
_ "k8s.io/client-go/pkg/apis/authentication/install"
_ "k8s.io/client-go/pkg/apis/autoscaling/install"
_ "k8s.io/client-go/pkg/apis/batch/install"
_ "k8s.io/client-go/pkg/apis/extensions/install"
_ "k8s.io/client-go/pkg/apis/policy/install"
_ "k8s.io/client-go/pkg/apis/storage/install"
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Appears to no longer be needed.

@bethge bethge force-pushed the fixup-goclient-upgrade branch 2 times, most recently from 15d7bb6 to fe07a81 Compare January 2, 2018 12:51
func TestDecode(t *testing.T) {
dir := "test-fixtures"
tcs := map[string]string{
"manifest-deployment.yaml": "",
Copy link
Member

@svenwltr svenwltr Jan 2, 2018

Choose a reason for hiding this comment

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

What do you think about this:

"manifest-deployment.yaml": readFile(t, path.Join(dir, "manifest-deployment.yaml")),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, that works too and is more succinct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@bethge bethge force-pushed the fixup-goclient-upgrade branch from fe07a81 to 8df185d Compare January 2, 2018 13:31
svenwltr
svenwltr previously approved these changes Jan 2, 2018
@bethge bethge force-pushed the fixup-goclient-upgrade branch from 0274767 to 054c017 Compare January 3, 2018 14:18
@bethge bethge dismissed stale reviews from stephanlindauer, svenwltr, and octopusx January 3, 2018 14:22

added file struct

@bethge
Copy link
Contributor Author

bethge commented Jan 3, 2018

@rebuy-de/prp-kubernetes-deployment - PTAL

@bethge bethge merged commit 4c3c9b2 into master Jan 3, 2018
@bethge bethge deleted the fixup-goclient-upgrade branch January 3, 2018 14:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants