epam / epam/hubctl

Make optional `components/directory`

Open
#52 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
11
Forks
3
Avg merge
7d 47m
Merged PRs (30d)
1

Description

Today `hubctl` always requires user to specify component source directory like the following:

```yaml
components:
- name: nginx
source:
dir: components/nginx
git:
remote: https://github.com/epam/hub-kubeflow-components.git
subDir: nginx-ingress
```

We need to allow `hubctl` to tolerate following syntax:

```yaml
components:
- name: nginx
source:
git:
remote: https://github.com/epam/hub-kubeflow-components.git
subDir: nginx-ingress
```

This means user wants to take component from git repo, but doesn't want to maintain it. In this case expected behaviour, `hubctl` (or extension) should fetch component to the disposable directory. Probably `$HUB_BASE_DIR/.hub`. Version of the component should be managed by `git/ref` when component is a commit sensitive.

When user decided to make their copy of the component they can add `source/dir` parameter. In this case `hubctl` (or extension) should not check if component remotely has been updated.

At the present with current design suggesting to declare reason to refresh components in the Hubfile

```yaml
extensions:
deploy:
configure:
- components. # to refresh on configure
before:
- components. # to refresh on pre-deploy action
```

If above not defined then the component is not fetched and `hubctl` works as today

- [ ] Create is a `components` extension to manage this behaviour
- [ ] Move component fetch from `hub-init` to the new extension
- [ ] Update hubctl to tolerate behaviour in `hubctl elaborate`
- [ ] Update documentation

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.