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

Fix args for tls cert and key #835

Closed
wants to merge 1 commit into from

Conversation

savitaashture
Copy link
Contributor

Changes

Issue:

Readiness probe failed: Get https://10.116.0.74:8443/live: http: server gave HTTP response to HTTPS client

Fix: cert and key files were not transferred to el main.go and because of that we were getting above error

/assign @dibyom @khrm

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Release Notes

NONE

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 20, 2020
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign vtereso
You can assign the PR to them by writing /assign @vtereso in a comment when ready.

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

Needs approval from an approver in each of these files:

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

@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 20, 2020
@@ -565,13 +565,13 @@ func getContainer(el *v1alpha1.EventListener) corev1.Container {
"-el-name", el.Name,
"-el-namespace", el.Namespace,
"-port", strconv.Itoa(*ElPort),
"-tls-cert", elCert,
Copy link
Member

Choose a reason for hiding this comment

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

this looks like we just changed the position of the args...did that actually solve the issue? 🤯

Copy link
Contributor

Choose a reason for hiding this comment

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

I am also confused about this.

Copy link
Contributor Author

@savitaashture savitaashture Nov 21, 2020

Choose a reason for hiding this comment

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

Issue is whatever args we set after -is-multi-ns the args value for those are not effected in initializtion.go file

ex:
Added -port after -is-multi-ns and the port value not effected in initializtion.go file

{"level":"fatal","ts":"2020-11-22T15:47:04.890Z","logger":"eventlistener","caller":"eventlistenersink/main.go:80","msg":"-port arg not found","knative.dev/controller":"eventlistener","stacktrace":"main.main\n\tgithub.com/tektoncd/triggers/cmd/eventlistenersink/main.go:80\nruntime.main\n\truntime/proc.go:204"}

Thats why just moved those args above -is-multi-ns

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 sure what's the issue with -is-multi-ns 🤔

Copy link
Member

Choose a reason for hiding this comment

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

got it, I think setting is-multi-ns: "false" is messing things up. Maybe we can just not set the flag when its false and then just set is-multi-ns when we need to set it to true.

Copy link
Member

Choose a reason for hiding this comment

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

From https://golang.org/pkg/flag/#hdr-Command_line_flag_syntax:

The following forms are permitted:

-flag
-flag=x
-flag x  // non-boolean flags only

In the deployment that we generate, we are using the last form (-flag x) which does not work for boolean flags.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes will modify logic for is-multi-ns

Copy link
Contributor

@khrm khrm Nov 23, 2020

Choose a reason for hiding this comment

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

@dibyom That was not the issue. Issue is something else. Even if we set -is-multi-ns to false, I found that certain permutations weren't working. So I decided to change the way we pass Arg and every permutations work.

https://github.com/tektoncd/triggers/pull/838/files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With that changes it fixes issue with --is-multi-ns but still we get permission issue

E1123 08:17:43.821688       1 reflector.go:178] k8s.io/client-go@v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible/tools/cache/reflector.go:125: Failed to list *v1alpha1.ClusterTriggerBinding: clustertriggerbindings.triggers.tekton.dev is forbidden: User "system:serviceaccount:tlstest:tekton-triggers-tls-sa" cannot list resource "clustertriggerbindings" in API group "triggers.tekton.dev" at the cluster scope
E1123 08:17:47.527568       1 reflector.go:178] k8s.io/client-go@v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible/tools/cache/reflector.go:125: Failed to list *v1alpha1.ClusterTriggerBinding: clustertriggerbindings.triggers.tekton.dev is forbidden: User "system:serviceaccount:tlstest:tekton-triggers-tls-sa" cannot list resource "clustertriggerbindings" in API group "triggers.tekton.dev" at the cluster scope
E1123 08:17:54.554289       1 reflector.go:178] k8s.io/client-go@v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible/tools/cache/reflector.go:125: Failed to list *v1alpha1.ClusterTriggerBinding: clustertriggerbindings.triggers.tekton.dev is forbidden: User "system:serviceaccount:tlstest:tekton-triggers-tls-sa" cannot list resource "clustertriggerbindings" in API group "triggers.tekton.dev" at the cluster scope

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 will be closing this as its fixed by 838 PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants