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

Cleanup oadm router somewhat #7251

Merged
merged 2 commits into from
Feb 19, 2016

Conversation

smarterclayton
Copy link
Contributor

Still more work to do in the router command, it's gotten... opaque.

@liggitt

@smarterclayton
Copy link
Contributor Author

@detiber starting with 1.2/3.2 we will want to pass --subdomain=ROUTER_SUBDOMAIN to oadm router in a single le. The default config should remain for back compat.

@smarterclayton
Copy link
Contributor Author

[test]

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 12, 2016
@smarterclayton smarterclayton force-pushed the cleanup_plugins branch 2 times, most recently from fc91672 to 1231ab0 Compare February 12, 2016 22:51
@smarterclayton
Copy link
Contributor Author

Ok, this now includes even more function - it:

  • remove hostport support from oadm router - it's useless and someone can set that on their own
  • store default certificate as a secret and plumb the path all the way down to the haproxy instance
  • change the default from using ENV for secrets to using service account, and generate resources for each thing that needs to be set
    • default certificate is passed as bytes if this flag is set, otherwise is set as a path environment variable
  • cleanup the SCC warning on the router
  • the --ports mapping is now repurposed to the mapping on the router service (to make routers easier to remap)
  • support --subdomain as a template

I've done local testing and everything seems to be ok, but needs a bit more look and love.

@detiber FYI this is changing router default to create a service account - all other flags are the same, but you can now omit --credentials, and we probably want to start setting --subdomain

@pweil- @ramr for review

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 12, 2016
@smarterclayton smarterclayton force-pushed the cleanup_plugins branch 2 times, most recently from b6ed377 to f4302bc Compare February 13, 2016 06:16
@@ -64,20 +66,31 @@ you have failover protection.`
secretsVolumeName = "secret-volume"
secretsPath = "/etc/secret-volume"

defaultCertificateDir = "/etc/pki/tls/private"
Copy link
Contributor

Choose a reason for hiding this comment

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

is this standard? if so, [citation needed] as a comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@smarterclayton
Copy link
Contributor Author

@ramr review please

@smarterclayton
Copy link
Contributor Author

moar eyes

@pweil-
Copy link
Contributor

pweil- commented Feb 17, 2016

@Kargakis - would you mind giving this some eyeballs since I'm tied up still?

ObjectMeta: kapi.ObjectMeta{
Name: fmt.Sprintf("%s-certs", cfg.Name),
},
Type: "kubernetes.io/tls",
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not in our branch yet

On Wed, Feb 17, 2016 at 11:51 AM, Michail Kargakis <[email protected]

wrote:

In pkg/cmd/admin/router/router.go
#7251 (comment):

        Name:      secretsVolumeName,
        ReadOnly:  true,
        MountPath: secretsPath,
    }
  •   mounts = append(mounts, mount)
    
  • }
  • if len(defaultCert) > 0 {
  •   // TODO: extract the private key from the CRT and set it as its own key
    
  •   // TODO: use upstream constants for this
    
  •   secret := &kapi.Secret{
    
  •       ObjectMeta: kapi.ObjectMeta{
    
  •           Name: fmt.Sprintf("%s-certs", cfg.Name),
    
  •       },
    
  •       Type: "kubernetes.io/tls",
    

https://github.com/kubernetes/kubernetes/blob/0866c377e9a84a73e0ff78efdd1def7f7e8b437a/pkg/api/types.go#L2311


Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/7251/files#r53193982.

@smarterclayton
Copy link
Contributor Author

@liggitt review last commit

@liggitt
Copy link
Contributor

liggitt commented Feb 18, 2016

one question on newline in encoding PEM blocks

@smarterclayton
Copy link
Contributor Author

Does add trailing newline.

Don't require user to have SCC access to create a router, clean up
errors, check the appropriate scc permissions. Stop exposing hostPorts
and use secrets for the default certificate.
@smarterclayton
Copy link
Contributor Author

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/5028/) (Image: devenv-rhel7_3476)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 241d02b

@smarterclayton
Copy link
Contributor Author

[test]

@smarterclayton
Copy link
Contributor Author

Well this is a nice flake:

ERROR: gave up waiting for https://127.0.0.1:38443/healthz

!!! Error in /data/src/github.com/openshift/origin/hack/../hack/util.sh:370
    'return 1' exited with status 1
Call stack:
    1: /data/src/github.com/openshift/origin/hack/../hack/util.sh:370 start_os_master(...)
    2: /data/src/github.com/openshift/origin/hack/update-generated-swagger-spec.sh:50 main(...)
Exiting with status 1
[INFO] Dumping container logs to /tmp/openshift/generate-swagger-spec//logs
[INFO] Dumping all resources to /tmp/openshift/generate-swagger-spec//logs/export_all.json
Authentication required for https://127.0.0.1:38443 (openshift)
Username: system:admin
Password: error: username system:admin is invalid for basic auth
error: failed to negotiate an api version; server supports: map[], client supports: map[v1:{} v1beta3:{} extensions/v1beta1:{} metrics/v1alpha1:{} componentconfig/v1alpha1:{} authorization.k8s.io/v1beta1:{}]

@smarterclayton
Copy link
Contributor Author

[test]

@smarterclayton
Copy link
Contributor Author

Error from server: buildconfigs "test" not found
W0219 00:44:52.316886    5128 cmd.go:212] -p POD is DEPRECATED and will be removed in a future version. Use exec POD instead.
!!! Error in hack/../hack/../test/end-to-end/core.sh:299
    'grep -q "unable to validate against any security context constraint"' exited with status 0 1
Call stack:
    1: hack/../hack/../test/end-to-end/core.sh:299 main(...)
Exiting with status 1
Error from server: User "e2e-default-admin" cannot list all buildconfigs in the cluster

[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 241d02b

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/1380/)

openshift-bot pushed a commit that referenced this pull request Feb 19, 2016
@openshift-bot openshift-bot merged commit dd651fa into openshift:master Feb 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants