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

Tekton: Migrate from PipelineResources #1218

Merged
merged 1 commit into from Jun 21, 2023

Conversation

Sgitario
Copy link
Collaborator

No description provided.

@Sgitario Sgitario force-pushed the 1007_migrate branch 6 times, most recently from fbb4e31 to 264935e Compare June 20, 2023 13:30
@Sgitario Sgitario marked this pull request as ready for review June 20, 2023 13:30
@Sgitario Sgitario requested a review from iocanel June 20, 2023 13:38
Copy link
Member

@iocanel iocanel left a comment

Choose a reason for hiding this comment

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

@Sgitario I tried reviewing the PR but I am missing the context.
It's not clear to me what you are trying to do and why.

Some rough examples:

  • Why do we need a clone step ?
  • Why in some areas are replacing ouput references for had coded values ?

Note, that I have't touched tekton for nearly two years now, so I am bit rusty.

.withNewMetadata()
.withName(name)
.withAnnotations(this.annotations)
.endMetadata()
.withType(TYPE)
.addToData(DOT_DOCKER_CONFIG_JSON, this.content)
.build();
.addToData(DOT_DOCKER_CONFIG_JSON, this.content);
Copy link
Member

Choose a reason for hiding this comment

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

Why don't you just make that key configuralbe? It will save you the doUpate and extending thing.
Alterntatively, you can just create a decorator that applies the name of they key.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because we need these two keys. The config.json is for the step and the .dockerconfigjson one is the standard for Kubernetes image pull secret.
I wrote a commend in the class that explained why it was required.

* For example, the kaniko image explicitly requires the config.json file. See more in
* https://artifacthub.io/packages/tekton-task/tekton-tasks/kaniko?modal=manifest.
*/
public class AddDockerConfigJsonSecretDecorator extends io.dekorate.kubernetes.decorator.AddDockerConfigJsonSecretDecorator {
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't need to extend this class just to use a different file name .

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same comment than in #1218 (comment)

@Sgitario
Copy link
Collaborator Author

@Sgitario I tried reviewing the PR but I am missing the context. It's not clear to me what you are trying to do and why.

Some rough examples:

  • Why do we need a clone step ?

We need a git clone step, because the PipelineResources of type git is removed in Tekton 0.47. For the migration, I did what was described in https://tekton.dev/docs/pipelines/resources/ which says to replace the pipelineresources to params and use the git-clone task (see the image).

  • Why in some areas are replacing ouput references for had coded values ?

As far as I see, there are no hard-coded values, but default values that users can modify if needed. I don't think this has changed by these changes. But before these properties were provided via resources inputs/outputs, and now via params.

Note, that I have't touched tekton for nearly two years now, so I am bit rusty.

@iocanel
Copy link
Member

iocanel commented Jun 20, 2023

Thanks @Sgitario much clearer now.

@Sgitario Sgitario requested a review from iocanel June 21, 2023 05:05
@Sgitario
Copy link
Collaborator Author

Thanks @Sgitario much clearer now.

No problem!

@sonarcloud
Copy link

sonarcloud bot commented Jun 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Sgitario Sgitario requested a review from iocanel June 21, 2023 10:01
@Sgitario
Copy link
Collaborator Author

@iocanel PR updated with the changes you proposed.

Copy link
Member

@iocanel iocanel left a comment

Choose a reason for hiding this comment

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

LGTM

@iocanel iocanel merged commit 3d21ea3 into dekorateio:main Jun 21, 2023
7 of 8 checks passed
@Sgitario Sgitario deleted the 1007_migrate branch June 21, 2023 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants