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

control-service: Create Github repository on Helm install #64

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

tpalashki
Copy link
Contributor

@tpalashki tpalashki commented Aug 10, 2021

The Git parameters of the Helm installation are now optional.

If no Git parameters are specified, the Helm installation will
automatically create a new public Git repository in
https://github.com/versatile-data-kit-jobs. The name of the
new repository can be specified via the deploymentGitRepoName
parameter. If no name is specified, the name will be a randomly
generated UUID.

Finally, if specified, the deploymentGitUrl will take precedence
over deploymentGitRepoName.

Signed-off-by: Tsvetomir Palashki [email protected]

helm.sh/hook-delete-policy: before-hook-creation
helm.sh/resource-policy: keep
data:
git-repo-name: {{ .Values.deploymentGitRepoName | default uuidv4 | b64enc | quote }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

How this behave during upgrade ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should not trigger during upgrades, there is a pre-upgrade hook for this case.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What if I install it with defaults and then change the git repo to custom git repository

What if I use custom repository and decide to switch to default. That may be a corner case but we need to be clear what happens.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both scenarios work by setting the respective value during upgrade. Let's say you have installed with the defaults and then want to switch to custom git, then you'd do:

helm upgrade name repo/chart --set deploymentGitUrl=gitserver.com/my-custom-repo.git

Works the other way around by setting deploymentGitUrl to "".

@antoniivanov
Copy link
Collaborator

Reminder: https://github.com/vmware/versatile-data-kit/blob/main/support/git-commit-template.txt

Describe the aim of the change and why it is needed. What business problem does it solve?

apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-map
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not a map. Please use more descriptive name.

helm.sh/resource-policy: keep
data:
git-repo-name: {{ .Values.deploymentGitRepoName | default uuidv4 | b64enc | quote }}
git-server: {{ "github.com/versatile-data-kit-jobs" | b64enc | quote }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why these are hard-coded?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are the defaults that we fall back to when no git information is specified during Helm installation. We need to have them somewhere in the chart.

apiVersion: batch/v1
kind: Job
metadata:
name: "{{ .Release.Name }}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use more descriptive name.

@tpalashki tpalashki force-pushed the person/tpalashki/create-git-repo-on-helm-install branch from 64b646c to 957eee2 Compare August 10, 2021 09:01
As part of the effort to improve the experience of users
willing to try out the control service, we are making
changes to the Helm chart to allow installation with
minimal effort.

This commit makes Git parameters of the Helm installation optional.

If no Git parameters are specified, the Helm installation will
automatically create a new public Git repository in
https://github.com/versatile-data-kit-jobs. The name of the
new repository can be specified via the `deploymentGitRepoName`
parameter. If no name is specified, the name will be a randomly
generated UUID.

Finally, if specified, the `deploymentGitUrl` will take precedence
over `deploymentGitRepoName`.

Signed-off-by: Tsvetomir Palashki <[email protected]>
@tpalashki tpalashki force-pushed the person/tpalashki/create-git-repo-on-helm-install branch from 957eee2 to 9d0fdde Compare August 10, 2021 10:10
@tpalashki tpalashki merged commit f7a9b54 into main Aug 10, 2021
@tpalashki tpalashki deleted the person/tpalashki/create-git-repo-on-helm-install branch August 10, 2021 10:57
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.

4 participants