Skip to content

use apiserver args for enabling and disabling alpha versions - #14941

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
deads2k:api-19-respect-kube-args
Jul 5, 2017
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
deads2k:api-19-respect-kube-args

Conversation

@deads2k

@deads2k deads2k commented Jun 28, 2017

Copy link
Copy Markdown
Contributor

This allows us to disable alpha versions by default, but still allow them to be enabled via config.

@mfojtik

@mfojtik mfojtik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

nicely done

@mfojtik

mfojtik commented Jun 29, 2017

Copy link
Copy Markdown
Contributor

[test]


// GetKubeAPIServerFlagAPIEnablement parses the available flag at the groupVersion level
// with no support for individual resources and no support for the legacy API.
func GetKubeAPIServerFlagAPIEnablement(flagValue []string) map[schema.GroupVersion]bool {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deads2k what I was thinking about was something like:

func IsAPIEnabled(name string, values []string) bool {
  flagValues := sets.NewString(values...)
  return flagValues.Has(name + "=true")
}

@deads2k
deads2k force-pushed the api-19-respect-kube-args branch from 1afdc08 to f554a11 Compare June 30, 2017 15:14
@deads2k

deads2k commented Jun 30, 2017

Copy link
Copy Markdown
Contributor Author

@mfojtik updated to pass tests. Take another look through?

}
expected := sets.NewString(versions...)
actual := enabled.Difference(sets.NewString(api.KubeAPIGroupsToDeadVersions[group]...))
actual := enabled.Difference(sets.NewString(api.KubeDefaultDisabledVersions[group]...))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why this change?

// Map of group names to known, but disallowed REST API versions
KubeAPIGroupsToDeadVersions = map[string][]string{
// Map of group names to known, but disabled REST API versions
KubeDefaultDisabledVersions = map[string][]string{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nvmd first comment.

@mfojtik

mfojtik commented Jun 30, 2017

Copy link
Copy Markdown
Contributor

still LGTM

@smarterclayton

Copy link
Copy Markdown
Contributor

LGTM

@deads2k

deads2k commented Jun 30, 2017

Copy link
Copy Markdown
Contributor Author

[merge]

@deads2k
deads2k force-pushed the api-19-respect-kube-args branch 2 times, most recently from 0a27865 to cf61966 Compare June 30, 2017 19:27
@deads2k deads2k added the lgtm Indicates that a PR is ready to be merged. label Jun 30, 2017
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 30, 2017
@mfojtik

mfojtik commented Jul 3, 2017

Copy link
Copy Markdown
Contributor

@deads2k rebase :(

@deads2k
deads2k force-pushed the api-19-respect-kube-args branch from cf61966 to 297c75a Compare July 3, 2017 17:04
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 3, 2017
@0xmichalis

0xmichalis commented Jul 5, 2017 •

Copy link
Copy Markdown
Contributor

Note sure if this real or a flake:

Details
--- FAIL: TestNewWithDelegate (0.03s)
	config_test.go:134: HTTP/1.1 200 OK
		Content-Length: 286
		Content-Type: application/json
		Date: Mon, 03 Jul 2017 23:59:06 GMT
		
		{
		  "paths": [
		    "/apis",
		    "/bar",
		    "/foo",
		    "/healthz",
		    "/healthz/delegate-health",
		    "/healthz/ping",
		    "/healthz/poststarthook/delegate-post-start-hook",
		    "/healthz/poststarthook/wrapping-post-start-hook",
		    "/healthz/wrapping-health",
		    "/swaggerapi"
		  ]
		}
	config_test.go:134: HTTP/1.1 500 Internal Server Error
		Content-Length: 229
		Content-Type: text/plain; charset=utf-8
		Date: Mon, 03 Jul 2017 23:59:06 GMT
		X-Content-Type-Options: nosniff
		
		[+]ping ok
		[-]wrapping-health failed: reason withheld
		[-]delegate-health failed: reason withheld
		[+]poststarthook/delegate-post-start-hook ok
		[-]poststarthook/wrapping-post-start-hook failed: reason withheld
		healthz check failed
		
	config_test.go:142: "http://127.0.0.1:45803/healthz" expected [+]ping ok
		[-]wrapping-health failed: reason withheld
		[-]delegate-health failed: reason withheld
		[+]poststarthook/delegate-post-start-hook ok
		[+]poststarthook/wrapping-post-start-hook ok
		healthz check failed
		, got [+]ping ok
		[-]wrapping-health failed: reason withheld
		[-]delegate-health failed: reason withheld
		[+]poststarthook/delegate-post-start-hook ok
		[-]poststarthook/wrapping-post-start-hook failed: reason withheld
		healthz check failed
	config_test.go:134: HTTP/1.1 500 Internal Server Error
		Content-Length: 51
		Content-Type: text/plain; charset=utf-8
		Date: Mon, 03 Jul 2017 23:59:06 GMT
		X-Content-Type-Options: nosniff
		
		internal server error: delegate failed healthcheck
		
	config_test.go:134: HTTP/1.1 500 Internal Server Error
		Content-Length: 51
		Content-Type: text/plain; charset=utf-8
		Date: Mon, 03 Jul 2017 23:59:06 GMT
		X-Content-Type-Options: nosniff
		
		internal server error: wrapping failed healthcheck
		
	config_test.go:134: HTTP/1.1 200 OK
		Content-Length: 2
		Content-Type: text/plain; charset=utf-8
		Date: Mon, 03 Jul 2017 23:59:06 GMT
		
		ok
	config_test.go:134: HTTP/1.1 500 Internal Server Error
		Content-Length: 36
		Content-Type: text/plain; charset=utf-8
		Date: Mon, 03 Jul 2017 23:59:06 GMT
		X-Content-Type-Options: nosniff
		
		internal server error: not finished
		
	config_test.go:142: "http://127.0.0.1:45803/healthz/poststarthook/wrapping-post-start-hook" expected ok, got internal server error: not finished
	config_test.go:145: "http://127.0.0.1:45803/healthz/poststarthook/wrapping-post-start-hook" expected 200, got 500
	config_test.go:134: HTTP/1.1 403 Forbidden
		Content-Type: text/plain; charset=utf-8
		Date: Mon, 03 Jul 2017 23:59:06 GMT
		Content-Length: 0
		
		
	config_test.go:134: HTTP/1.1 401 Unauthorized
		Content-Type: text/plain; charset=utf-8
		Date: Mon, 03 Jul 2017 23:59:06 GMT
		Content-Length: 0

https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/1219/consoleFull#84466107158b6e51eb7608a5981914356

@deads2k

deads2k commented Jul 5, 2017

Copy link
Copy Markdown
Contributor Author

re[test] re[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 297c75a

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 297c75a

@openshift-bot

openshift-bot commented Jul 5, 2017 •

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/1233/) (Base Commit: 8c14994) (PR Branch Commit: 297c75a) (Image: devenv-rhel7_6426)

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/2969/) (Base Commit: c9f829c) (PR Branch Commit: 297c75a)

@openshift-bot
openshift-bot merged commit 22888b2 into openshift:master Jul 5, 2017
@sttts sttts mentioned this pull request Jul 12, 2017
14 of 32 tasks
@deads2k
deads2k deleted the api-19-respect-kube-args branch August 3, 2017 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants