Skip to content

Conversation

@crawford
Copy link
Contributor

@crawford crawford commented Jan 9, 2019

The install-config needs to be versioned in order to allow the installer
to make changes, breaking or otherwise. Since the install-config is
already a valid Kubernetes object, it adopts the same versioning scheme.

cc @dgoodwin @wking @abhinavdahiya @smarterclayton

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 9, 2019
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 9, 2019
@wking
Copy link
Member

wking commented Jan 9, 2019

has some unit-test errors, but otherwise looks good to me.

Copy link
Member

Choose a reason for hiding this comment

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

Do we want to SemVer this to make it easier to see feature additions? Or will we not bump on feature additions and only bunp this for backwards-incompatible changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was originally going to use semver, but then decided with K8S versioning. This was just done for continuity with the rest of the ecosystem. If we were to adopt semver instead, would you still want to use the same field, or should we create a different version field?

Copy link
Member

@wking wking Jan 9, 2019

Choose a reason for hiding this comment

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

I was originally going to use semver, but then decided with K8S versioning.

Either is fine with me, I just want to know what the plan is ;).

This was just done for continuity with the rest of the ecosystem. If we were to adopt semver instead, would you still want to use the same field, or should we create a different version field?

I'm fine using this field for whatever version strings we pick.

@wking
Copy link
Member

wking commented Jan 9, 2019

You'll need to patch this into the openshift/release templates to avoid:

level=fatal msg="failed to fetch Terraform Variables: failed to load asset \"Install Config\": invalid \"install-config.yaml\" file: apiVersion: Required value: install-config version required"

See openshift/release#2506 for a similar adjustment. Or update this PR to assume unset means whatever we call the initial version.

@crawford
Copy link
Contributor Author

Requires openshift/release#2559 (and any other changes we want to make to the install config).

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 10, 2019
@crawford crawford added this to the Freeze milestone Jan 10, 2019
@crawford
Copy link
Contributor Author

Just want to confirm that CI change.

/retest

@abhinavdahiya
Copy link
Contributor

/hold cancel
/lgtm
/retest

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jan 11, 2019
@crawford
Copy link
Contributor Author

crawford commented Jan 11, 2019

/hold

We need to wait for the other PRs which change the format of the install config to merge first.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 11, 2019
@crawford
Copy link
Contributor Author

All of the other changes to the install config have landed. I'm going to let this one through now.

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 12, 2019
@wking
Copy link
Member

wking commented Jan 12, 2019

Hrm, this will need a rebase, but maybe just for unit tests, so should be fine post-freeze.

The install-config needs to be versioned in order to allow the installer
to make changes, breaking or otherwise. Since the install-config is
already a valid Kubernetes object, it adopts the same versioning scheme.
@crawford
Copy link
Contributor Author

The following patch was needed once ec92355 was merged:

diff --git a/pkg/asset/installconfig/installconfig_test.go b/pkg/asset/installconfig/installconfig_test.go
index 77736f562..1874e8240 100644
--- a/pkg/asset/installconfig/installconfig_test.go
+++ b/pkg/asset/installconfig/installconfig_test.go
@@ -57,6 +57,9 @@ func TestInstallConfigGenerate_FillsInDefaults(t *testing.T) {
                t.Errorf("unexpected error generating install config: %v", err)
        }
        expected := &types.InstallConfig{
+               TypeMeta: metav1.TypeMeta{
+                       APIVersion: "v1beta1",
+               },
                ObjectMeta: metav1.ObjectMeta{
                        Name: "test-cluster",
                },
@@ -102,6 +105,7 @@ func TestInstallConfigLoad(t *testing.T) {
                {
                        name: "valid InstallConfig",
                        data: `
+apiVersion: v1beta1
 metadata:
   name: test-cluster
 baseDomain: test-domain
@@ -112,6 +116,9 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
 `,
                        expectedFound: true,
                        expectedConfig: &types.InstallConfig{
+                               TypeMeta: metav1.TypeMeta{
+                                       APIVersion: "v1beta1",
+                               },
                                ObjectMeta: metav1.ObjectMeta{
                                        Name: "test-cluster",
                                },

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 12, 2019
@wking
Copy link
Member

wking commented Jan 12, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 12, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, crawford, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,crawford,wking]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sttts
Copy link
Contributor

sttts commented Jan 15, 2019

Shouldn't we conform with Kubernetes api versions and put this into an api group, like installer.openshift.io/v1beta1 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants