Skip to content

Commit 0e509fc

Browse files
committed
chore: align workflows and docs with new manifests structure
Signed-off-by: alokdangre <alokdangre@gmail.com>
1 parent 4580df1 commit 0e509fc

File tree

2 files changed

+141
-140
lines changed

2 files changed

+141
-140
lines changed

.github/workflows/linting_bash_python_yaml_files.yaml

Lines changed: 130 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -10,141 +10,141 @@ jobs:
1010
format_python_files:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v5
14-
15-
- name: Python Files Formatting Guidelines
16-
run: |
17-
echo "### Python Files Formatting Guidelines ###
18-
If there is a formatting error in your python files,
19-
1. First install black
20-
It requires Python 3.8+ to run.
21-
Install with 'pip install black' and if you use pipx, install Black with 'pipx install black'.
22-
If you want to format Jupyter Notebooks, install with 'pip install black[jupyter]'.
23-
24-
2. Run the command
25-
'python -m black {source_file_or_directory}' or
26-
'black {source_file_or_directory}'
27-
to format python files.
28-
"
29-
- uses: psf/black@stable
30-
with:
31-
src: |
32-
./backend
13+
- uses: actions/checkout@v5
14+
15+
- name: Python Files Formatting Guidelines
16+
run: |
17+
echo "### Python Files Formatting Guidelines ###
18+
If there is a formatting error in your python files,
19+
1. First install black
20+
It requires Python 3.8+ to run.
21+
Install with 'pip install black' and if you use pipx, install Black with 'pipx install black'.
22+
If you want to format Jupyter Notebooks, install with 'pip install black[jupyter]'.
23+
24+
2. Run the command
25+
'python -m black {source_file_or_directory}' or
26+
'black {source_file_or_directory}'
27+
to format python files.
28+
"
29+
- uses: psf/black@stable
30+
with:
31+
src: |
32+
./backend
3333
3434
format_YAML_files:
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@v4
38-
with:
39-
fetch-depth: 0
40-
41-
- name: Install yamllint
42-
run: pip install yamllint
43-
44-
- name: YAML Formatting Guidelines
45-
run: |
46-
echo "### YAML Formatting Guidelines ###
47-
If there is a formatting error in your YAML file, you will see errors like the one below:
48-
'Error: 6:4 [indentation] wrong indentation: expected 2 but found 3'
49-
50-
6:4 means line 6, column 4.
51-
52-
To fix these errors, refer to the YAML formatting rules at:
53-
https://yamllint.readthedocs.io/en/stable/rules.html#
54-
55-
Search for the keyword inside the brackets [] in the error message. In this example, it's 'indentation'.
56-
Note: Some rules have been customized in the '.yamllint.yaml' file. Below is the content of that file:
57-
58-
extends: default
59-
60-
rules:
61-
document-start:
62-
present: false
63-
document-end:
64-
present: false
65-
indentation:
66-
indent-sequences: false
67-
line-length:
68-
max: 400
69-
"
70-
71-
- name: Fetch master branch
72-
run: git fetch origin master
73-
74-
- name: Set up changed files
75-
id: changed_files
76-
run: |
77-
git diff --name-only --diff-filter=AM origin/master...HEAD \
78-
| grep -v 'upstream' \
79-
| grep -E '^common/.*\.ya?ml$|^example/.*\.ya?ml$|^hack/.*\.ya?ml$|^tests/.*\.ya?ml$|^.github/.*\.ya?ml$' \
80-
> changed_files_in_PR.txt || true
81-
if [ ! -s changed_files_in_PR.txt ]; then
82-
echo "No YAML files have changed in this PR." > changed_files_in_PR.txt
83-
fi
84-
85-
- name: Display changed files
86-
run: cat changed_files_in_PR.txt
87-
88-
- name: Run yamllint on changed files
89-
id: lint
90-
run: |
91-
if grep -q 'No YAML files have changed in this PR.' changed_files_in_PR.txt; then
92-
echo "No YAML files have changed in this PR."
93-
else
94-
cat changed_files_in_PR.txt | xargs -I {} yamllint {} || exit 1
95-
fi
96-
shell: bash
97-
98-
- name: Check YAML lint results
99-
if: success() && steps.lint.outcome == 'success'
100-
run: echo "No styling issues with YAML files."
101-
shell: bash
37+
- uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
41+
- name: Install yamllint
42+
run: pip install yamllint
43+
44+
- name: YAML Formatting Guidelines
45+
run: |
46+
echo "### YAML Formatting Guidelines ###
47+
If there is a formatting error in your YAML file, you will see errors like the one below:
48+
'Error: 6:4 [indentation] wrong indentation: expected 2 but found 3'
49+
50+
6:4 means line 6, column 4.
51+
52+
To fix these errors, refer to the YAML formatting rules at:
53+
https://yamllint.readthedocs.io/en/stable/rules.html#
54+
55+
Search for the keyword inside the brackets [] in the error message. In this example, it's 'indentation'.
56+
Note: Some rules have been customized in the '.yamllint.yaml' file. Below is the content of that file:
57+
58+
extends: default
59+
60+
rules:
61+
document-start:
62+
present: false
63+
document-end:
64+
present: false
65+
indentation:
66+
indent-sequences: false
67+
line-length:
68+
max: 400
69+
"
70+
71+
- name: Fetch master branch
72+
run: git fetch origin master
73+
74+
- name: Set up changed files
75+
id: changed_files
76+
run: |
77+
git diff --name-only --diff-filter=AM origin/master...HEAD \
78+
| grep -v 'upstream' \
79+
| grep -E '^common/.*\.ya?ml$|^example/.*\.ya?ml$|^hack/.*\.ya?ml$|^tests/.*\.ya?ml$|^.github/.*\.ya?ml$|^manifests/.*\.ya?ml$' \
80+
> changed_files_in_PR.txt || true
81+
if [ ! -s changed_files_in_PR.txt ]; then
82+
echo "No YAML files have changed in this PR." > changed_files_in_PR.txt
83+
fi
84+
85+
- name: Display changed files
86+
run: cat changed_files_in_PR.txt
87+
88+
- name: Run yamllint on changed files
89+
id: lint
90+
run: |
91+
if grep -q 'No YAML files have changed in this PR.' changed_files_in_PR.txt; then
92+
echo "No YAML files have changed in this PR."
93+
else
94+
cat changed_files_in_PR.txt | xargs -I {} yamllint {} || exit 1
95+
fi
96+
shell: bash
97+
98+
- name: Check YAML lint results
99+
if: success() && steps.lint.outcome == 'success'
100+
run: echo "No styling issues with YAML files."
101+
shell: bash
102102

103103
format_bash_files:
104104
runs-on: ubuntu-latest
105105
steps:
106-
- uses: actions/checkout@v4
107-
with:
108-
fetch-depth: 0
109-
110-
- name: Install ShellCheck
111-
run: sudo apt install -y shellcheck
112-
113-
- name: Bash Formatting Guidelines
114-
run: |
115-
echo "### Bash Files Formatting Guidelines ###
116-
If there are errors and warnings regarding your bash files,
117-
You can check the error code definitions at https://www.shellcheck.net/wiki/.
118-
You can correct them using the https://www.shellcheck.net/ site.
119-
You have to ignore disable errors in the .shellcheckrc file.
120-
"
121-
122-
- name: Fetch master branch
123-
run: git fetch origin master
124-
125-
- name: Set up changed files
126-
id: changed_files
127-
run: |
128-
git diff --name-only origin/master...HEAD | grep -E '^[AM].*\.sh$' | grep -v '^applications/' | awk '{print $2}' > changed_files_in_PR.txt || true
129-
if [ ! -s changed_files_in_PR.txt ]; then
130-
echo "No bash files have changed in this PR."
131-
fi
132-
133-
- name: Display changed files
134-
if: always() # Always run this step
135-
run: cat changed_files_in_PR.txt || echo "No bash files have changed in this PR."
136-
137-
- name: Run ShellCheck on changed files
138-
id: lint
139-
run: |
140-
if grep -q 'No bash files have changed in this PR.' changed_files_in_PR.txt; then
141-
echo "No bash files have changed in this PR."
142-
else
143-
cat changed_files_in_PR.txt | xargs -I {} shellcheck {} || exit 1
144-
fi
145-
shell: bash
146-
147-
- name: Check Bash lint results
148-
if: success() && steps.lint.outcome == 'success'
149-
run: echo "No styling issues with Bash files."
150-
shell: bash
106+
- uses: actions/checkout@v4
107+
with:
108+
fetch-depth: 0
109+
110+
- name: Install ShellCheck
111+
run: sudo apt install -y shellcheck
112+
113+
- name: Bash Formatting Guidelines
114+
run: |
115+
echo "### Bash Files Formatting Guidelines ###
116+
If there are errors and warnings regarding your bash files,
117+
You can check the error code definitions at https://www.shellcheck.net/wiki/.
118+
You can correct them using the https://www.shellcheck.net/ site.
119+
You have to ignore disable errors in the .shellcheckrc file.
120+
"
121+
122+
- name: Fetch master branch
123+
run: git fetch origin master
124+
125+
- name: Set up changed files
126+
id: changed_files
127+
run: |
128+
git diff --name-only origin/master...HEAD | grep -E '^[AM].*\.sh$' | grep -v '^applications/' | awk '{print $2}' > changed_files_in_PR.txt || true
129+
if [ ! -s changed_files_in_PR.txt ]; then
130+
echo "No bash files have changed in this PR."
131+
fi
132+
133+
- name: Display changed files
134+
if: always() # Always run this step
135+
run: cat changed_files_in_PR.txt || echo "No bash files have changed in this PR."
136+
137+
- name: Run ShellCheck on changed files
138+
id: lint
139+
run: |
140+
if grep -q 'No bash files have changed in this PR.' changed_files_in_PR.txt; then
141+
echo "No bash files have changed in this PR."
142+
else
143+
cat changed_files_in_PR.txt | xargs -I {} shellcheck {} || exit 1
144+
fi
145+
shell: bash
146+
147+
- name: Check Bash lint results
148+
if: success() && steps.lint.outcome == 'success'
149+
run: echo "No styling issues with Bash files."
150+
shell: bash

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ You can apply the mentioned configurations by doing the following commands:
3333

3434
```bash
3535
# edit the configmap
36-
# CONFIG=config/overlays/kubeflow/kustomization.yaml
37-
CONFIG=config/base/kustomization.yaml
36+
# CONFIG=manifests/kustomize/overlays/kubeflow/kustomization.yaml
37+
CONFIG=manifests/kustomize/base/kustomization.yaml
3838
vim ${CONFIG}
3939

4040
# Add the following env vars to the configMapGenerator's literals
@@ -44,8 +44,8 @@ vim ${CONFIG}
4444
- APP_SECURE_COOKIES="False"
4545

4646
# reapply the kustomization
47-
# kustomize build config/overlays/kubeflow | kubectl apply -f -
48-
kustomize build config/base | kubectl apply -f -
47+
# kustomize build manifests/kustomize/overlays/kubeflow | kubectl apply -f -
48+
kustomize build manifests/kustomize/base | kubectl apply -f -
4949
```
5050

5151
## Configuration
@@ -100,17 +100,17 @@ spec:
100100
template:
101101
spec:
102102
containers:
103-
- name: kserve-models-web-app
104-
env:
105-
- name: ALLOWED_NAMESPACES
106-
value: "kubeflow-user,kubeflow-admin"
103+
- name: kserve-models-web-app
104+
env:
105+
- name: ALLOWED_NAMESPACES
106+
value: "kubeflow-user,kubeflow-admin"
107107
```
108108
109109
## Grafana Configuration
110110
111111
The application supports runtime configuration of Grafana endpoints and dashboard names, allowing you to use custom Grafana instances and dashboard configurations without rebuilding the application.
112112
113-
If you're deploying on Kubernetes with Kustomize, you can set these values in the application's ConfigMap by editing the `config/base/kustomization.yaml` (or your overlay) under `configMapGenerator` for `kserve-models-web-app-config`. Update the following literals as needed:
113+
If you're deploying on Kubernetes with Kustomize, you can set these values in the application's ConfigMap by editing the `manifests/kustomize/base/kustomization.yaml` (or your overlay) under `configMapGenerator` for `kserve-models-web-app-config`. Update the following literals as needed:
114114

115115
- `GRAFANA_PREFIX` (e.g., `/grafana` or `/custom-grafana`)
116116
- `GRAFANA_CPU_MEMORY_DB` (e.g., `db/custom-cpu-memory-dashboard`)
@@ -119,7 +119,7 @@ If you're deploying on Kubernetes with Kustomize, you can set these values in th
119119
After editing, reapply your manifests, for example:
120120

121121
```bash
122-
kustomize build config/base | kubectl apply -f -
122+
kustomize build manifests/kustomize/base | kubectl apply -f -
123123
```
124124

125125
### Configuration API
@@ -131,6 +131,7 @@ curl http://your-app-url/api/config
131131
```
132132

133133
Expected response:
134+
134135
```json
135136
{
136137
"grafanaPrefix": "/custom-grafana",

0 commit comments

Comments
 (0)