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(substition): fix configmap and secret volume param substition #3071

Merged
merged 1 commit into from Aug 11, 2020

Conversation

FogDong
Copy link
Member

@FogDong FogDong commented Aug 7, 2020

Changes

fix(substition): fix configmap and secret volume param substition

Fix #3070

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.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

 fix(substition): fix configmap and secret volume param substition

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 7, 2020
@tekton-robot
Copy link
Collaborator

Hi @FogDong. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 7, 2020
@ghost
Copy link

ghost commented Aug 7, 2020

/kind feature
/ok-to-test

@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 7, 2020
@ghost
Copy link

ghost commented Aug 7, 2020

This is great, thanks! Could you also update docs/variables.md to include these new entries? We have the following already:

| `Task` | `spec.volumes[].configmap.name` |
| `Task` | `spec.volumes[].secret.secretname` |

So I suggest also adding this:

| `Task` | `spec.volumes[].configmap.items[].key |
| `Task` | `spec.volumes[].configmap.items[].path |
| `Task` | `spec.volumes[].secret.items[].key |
| `Task` | `spec.volumes[].secret.items[].path |

@ghost
Copy link

ghost commented Aug 7, 2020

Looks like extra spaces causing the build errors:

=============================
==== RUNNING BUILD TESTS ====
=============================
-------------------------------------------
---- Checking go code style with gofmt ----
-------------------------------------------
diff -u pkg/reconciler/taskrun/resources/apply_test.go.orig pkg/reconciler/taskrun/resources/apply_test.go
--- pkg/reconciler/taskrun/resources/apply_test.go.orig	2020-08-07 14:14:29.678540289 +0000
+++ pkg/reconciler/taskrun/resources/apply_test.go	2020-08-07 14:14:29.679540367 +0000
@@ -144,7 +144,7 @@
 						Name: "$(inputs.params.FOO)",
 					},
 					Items: []corev1.KeyToPath{{
-						Key: "$(inputs.params.FOO)",
+						Key:  "$(inputs.params.FOO)",
 						Path: "$(inputs.params.FOO)",
 					}},
 				},
@@ -155,7 +155,7 @@
 				Secret: &corev1.SecretVolumeSource{
 					SecretName: "$(inputs.params.FOO)",
 					Items: []corev1.KeyToPath{{
-						Key: "$(inputs.params.FOO)",
+						Key:  "$(inputs.params.FOO)",
 						Path: "$(inputs.params.FOO)",
 					}},
 				},

@FogDong
Copy link
Member Author

FogDong commented Aug 7, 2020

@sbwsg Thank you for ur help ❤! Still not able to open the detail page because of the bad network...😭

@FogDong
Copy link
Member Author

FogDong commented Aug 7, 2020

Well I guess I have to fix the build check tomorrow, the network problem is killing me 😑

@FogDong
Copy link
Member Author

FogDong commented Aug 7, 2020

/retest

@FogDong FogDong closed this Aug 7, 2020
@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 7, 2020
@FogDong FogDong reopened this Aug 7, 2020
@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 7, 2020
@FogDong
Copy link
Member Author

FogDong commented Aug 9, 2020

PTAL @sbwsg 😉

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 10, 2020
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/lgtm
/meow

@tekton-robot
Copy link
Collaborator

@vdemeester: cat image

In response to this:

/lgtm
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 10, 2020
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbwsg, vdemeester

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

The pull request process is described 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

@vdemeester vdemeester added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Aug 11, 2020
@tekton-robot tekton-robot merged commit e2a7941 into tektoncd:master Aug 11, 2020
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Variable substitution doesn't work in configmap/secret items from volume
3 participants