File tree Expand file tree Collapse file tree 13 files changed +54
-46
lines changed Expand file tree Collapse file tree 13 files changed +54
-46
lines changed Original file line number Diff line number Diff line change 36
36
python-version : ' 3.10'
37
37
- name : Install dependencies
38
38
run : |
39
- python -m pip install --upgrade pip
39
+ pip install --upgrade pip
40
40
pip install -r build-requirements.txt
41
41
pip install -r requirements.txt
42
42
ansible-galaxy install -r requirements.yaml
Original file line number Diff line number Diff line change 38
38
python-version : ' 3.10'
39
39
- name : Install dependencies
40
40
run : |
41
- python -m pip install --upgrade pip
41
+ pip install --upgrade pip
42
42
pip install -r build-requirements.txt
43
43
pip install -r requirements.txt
44
44
ansible-galaxy install -r requirements.yaml
Original file line number Diff line number Diff line change 1
1
---
2
- minimum_pre_commit_version : 2.18.1
2
+ minimum_pre_commit_version : 3.3.3
3
3
4
4
repos :
5
5
8
8
9
9
# Conventional Commit message checker (commitizen)
10
10
- repo : https://github.com/commitizen-tools/commitizen
11
- rev : v2.23.0
11
+ rev : v3.5.3
12
12
hooks :
13
13
- id : commitizen
14
14
stages :
19
19
20
20
# Standard pre-commit rules
21
21
- repo : https://github.com/pre-commit/pre-commit-hooks
22
- rev : v4.1 .0
22
+ rev : v4.4 .0
23
23
hooks :
24
24
- id : check-case-conflict
25
25
- id : check-docstring-first
@@ -32,21 +32,21 @@ repos:
32
32
- --markdown-linebreak-ext=md
33
33
# Black (uncompromising) Python code formatter
34
34
- repo : https://github.com/psf/black
35
- rev : 22.3 .0
35
+ rev : 23.7 .0
36
36
hooks :
37
37
- id : black
38
38
args :
39
39
- --target-version
40
40
- py39
41
41
# MyPy
42
42
- repo : https://github.com/pre-commit/mirrors-mypy
43
- rev : v0.942
43
+ rev : v1.4.1
44
44
hooks :
45
45
- id : mypy
46
46
files : ^operator
47
47
# Pylint
48
48
- repo : https://github.com/pycqa/pylint
49
- rev : v2.13.5
49
+ rev : v2.17.4
50
50
hooks :
51
51
- id : pylint
52
52
files : ^operator
57
57
# All files that end '.yaml' or '.yaml.j2'
58
58
# See https://pre-commit.com/#filtering-files-with-types
59
59
- repo : https://github.com/adrienverge/yamllint
60
- rev : v1.26.3
60
+ rev : v1.32.0
61
61
hooks :
62
62
- id : yamllint
63
63
types :
Original file line number Diff line number Diff line change @@ -58,15 +58,19 @@ current health of your clone with: -
58
58
pre-commit run --all-files
59
59
60
60
## Building the operator (local development)
61
+ Pre-requisites: -
62
+
63
+ - Docker Compose (v2)
64
+
61
65
The operator container, residing in the ` operator ` directory,
62
66
is automatically built and pushed to Docker Hub using GitHub Actions.
63
67
64
68
You can build and push the image yourself using docker-compose.
65
69
The following will build an operator image with the tag ` 19.2.0-alpha.1 ` : -
66
70
67
71
export IMAGE_TAG=19.2.0-alpha.1
68
- docker- compose build
69
- docker- compose push
72
+ docker compose build
73
+ docker compose push
70
74
71
75
## Deploying into the Data Manager API
72
76
We use [ Ansible] 3 and community modules in [ Ansible Galaxy] as the deployment
Original file line number Diff line number Diff line change 1
- ansible-lint == 6.0 .2
2
- black == 22.3 .0
3
- mypy == 0.942
4
- pre-commit == 2.18.1
5
- pylint == 2.13.5
6
- yamllint == 1.26.3
1
+ ansible-lint == 6.17 .2
2
+ black == 23.7 .0
3
+ mypy == 1.4.1
4
+ pre-commit == 3.3.3
5
+ pylint == 2.17.4
6
+ yamllint == 1.32.0
Original file line number Diff line number Diff line change 13
13
#
14
14
# i.e.: -
15
15
#
16
- # IMAGE_TAG=19.3.0-alpha.1 docker- compose build
17
- # IMAGE_TAG=19.3.0-alpha.1 docker- compose push
16
+ # IMAGE_TAG=19.3.0-alpha.1 docker compose build
17
+ # IMAGE_TAG=19.3.0-alpha.1 docker compose push
18
18
19
19
version : ' 3.8'
20
20
Original file line number Diff line number Diff line change 1
- ansible == 4.10.0
2
- docker-compose == 1.29.2
1
+ ansible == 8.2.0
3
2
openshift == 0.13.1
Original file line number Diff line number Diff line change 3
3
# A ply to deploy objects to the chosen Data Manager namespace.
4
4
# In this case it's a Role and RoleBinding
5
5
6
- - include_tasks : prep.yaml
6
+ - name : Prep
7
+ ansible.builtin.include_tasks : prep.yaml
7
8
8
9
# Check the Data Manager Namespace and Service Account exists...
9
10
10
11
- name : Deploy DataManager RBAC objects
12
+ module_defaults :
13
+ group/k8s :
14
+ kubeconfig : " {{ jo_kubeconfig }}"
11
15
block :
12
16
13
17
- name : Get Data Manager Namespace ({{ jo_dmapi_namespace }})
17
21
register : ns_result
18
22
19
23
- name : Assert Namespace ({{ jo_dmapi_namespace }})
20
- assert :
24
+ ansible.builtin. assert :
21
25
that :
22
26
- ns_result.resources|length == 1
23
27
29
33
register : sa_result
30
34
31
35
- name : Assert ServiceAccount
32
- assert :
36
+ ansible.builtin. assert :
33
37
that :
34
38
- sa_result.resources|length == 1
35
39
40
44
loop :
41
45
- rbac-data-manager
42
46
- configmap-data-manager
43
-
44
- module_defaults :
45
- group/k8s :
46
- kubeconfig : " {{ jo_kubeconfig }}"
Original file line number Diff line number Diff line change 1
1
---
2
2
3
- - include_tasks : prep.yaml
3
+ - name : Prep
4
+ ansible.builtin.include_tasks : prep.yaml
4
5
5
6
- name : Assert operator version defined
6
- assert :
7
+ ansible.builtin. assert :
7
8
that :
8
9
- jo_image_tag|length > 0
9
10
- jo_image_tag != 'SetMe'
10
11
11
12
- name : Deploy using Kubernetes config
13
+ module_defaults :
14
+ group/k8s :
15
+ kubeconfig : " {{ jo_kubeconfig }}"
12
16
block :
13
17
14
- - include_tasks : deploy.yaml
18
+ - name : Deploy
19
+ ansible.builtin.include_tasks : deploy.yaml
15
20
when : jo_state|string == 'present'
16
- - include_tasks : undeploy.yaml
21
+ - name : Undeploy
22
+ ansible.builtin.include_tasks : undeploy.yaml
17
23
when : jo_state|string == 'absent'
18
-
19
- module_defaults :
20
- group/k8s :
21
- kubeconfig : " {{ jo_kubeconfig }}"
Original file line number Diff line number Diff line change 4
4
5
5
# Expose ansible version
6
6
- name : Display Ansible version
7
- debug :
7
+ ansible.builtin. debug :
8
8
var : ansible_version.full
9
9
10
10
# Expose all the installed Python modules...
11
11
12
12
- name : Capture pip freeze
13
- command : pip freeze
13
+ ansible.builtin. command : pip freeze
14
14
register : freeze
15
15
changed_when : false
16
16
17
17
- name : Display pip freeze
18
- debug :
18
+ ansible.builtin. debug :
19
19
var : freeze.stdout_lines
20
20
21
21
- name : Assert kubeconfig defined
22
- assert :
22
+ ansible.builtin. assert :
23
23
that :
24
24
- jo_kubeconfig|length > 0
25
25
- jo_kubeconfig != 'SetMe'
You can’t perform that action at this time.
0 commit comments