Loading .ansible-lint +0 −2 Changes for .ansible-lint: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -5,9 +5,7 @@ exclude_paths: - .gitlab-ci-local/ - .mypy_cache/ - .venv/ - ansible/secrets.yml - ansible/venv/ - public/ - venv/ skip_list: - var-naming Loading .gitignore +0 −12 Changes for .gitignore: 0 added lines, 12 removed lines. Original line number Diff line number Diff line # Python virtual environments venv/ ansible/venv/ docs/.venv/ .venv/ __pycache__/ *.pyc Loading @@ -13,15 +12,8 @@ ansible/.ansible/ .ansible/ *.retry ansible_facts/ ansible/secrets.yml ansible/inventory/*.local.yml # Automation folder - contains kubeconfig files generated by ansible automation/ # Generated kubeconfig files **/operator-platform-external-kubeconfig.yaml # IDE .vscode/ .idea/ Loading @@ -42,7 +34,3 @@ Thumbs.db # CI/CD .gitlab-ci-local/ # MkDocs build output public/ site/ .gitlab-ci.yml +7 −35 Changes for .gitlab-ci.yml: 7 added lines, 35 removed lines. Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ image: python:3.12-slim stages: - lint - test - docs - deploy variables: ANSIBLE_CONFIG: ansible/ansible.cfg Loading @@ -31,12 +29,12 @@ secret-scan: - apk add --no-cache git script: - | if git grep -nE 'g[l]pat-|g[h]p_|github_[p]at_' -- . ':!ansible/secrets.example.yml'; then if git grep -nE 'g[l]pat-|g[h]p_|github_[p]at_' -- .; then exit 1 fi begin_marker='-----BEGIN ' key_marker='PRIVATE KEY' if git grep -n -e "$begin_marker" -- . ':!ansible/secrets.example.yml' | grep -E "$key_marker"; then if git grep -n -e "$begin_marker" -- . | grep -E "$key_marker"; then exit 1 fi Loading @@ -58,38 +56,12 @@ syntax-check: script: - cd ansible - chmod 700 . - ansible-playbook -i inventory/hosts.yml --syntax-check playbooks/scenarios/full_oop/deploy-kubernetes.yml - ansible-playbook -i inventory/hosts.yml --syntax-check playbooks/scenarios/dual_oop/deploy-kubernetes.yml - ansible-playbook -i inventory/hosts.yml --syntax-check playbooks/scenarios/full_oop_existing_cluster/deploy.yml - | for playbook in playbooks/infrastructure/k3s/*.yml playbooks/scenarios/r2_existing_cluster/*.yml; do ansible-playbook -i inventory/r2.example.yml --syntax-check "$playbook" done python-smoke: stage: test script: - python3 -m py_compile docker-local-deployment/prepare_kubeconfig.py docs: stage: docs script: - python3 --version - pip --version 2>/dev/null || { python3 -m venv --without-pip .venv && source .venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3; } - pip install --upgrade pip - pip install -r docs/requirements.txt - mkdocs build --strict artifacts: paths: - public expire_in: 1 week pages: stage: deploy script: - python3 --version - pip --version 2>/dev/null || { python3 -m venv --without-pip .venv && source .venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3; } - pip install --upgrade pip - pip install -r docs/requirements.txt - mkdocs build --strict artifacts: paths: - public rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - python3 -m py_compile ansible/roles/oop-platform/files/fm_partners.py ansible/tests/r2_e2e/*.py .yamllint +0 −2 Changes for .yamllint: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -7,9 +7,7 @@ ignore: | .gitlab-ci-local/ .mypy_cache/ .venv/ ansible/secrets.yml ansible/venv/ public/ venv/ rules: Loading CONTRIBUTING.md +9 −6 Changes for CONTRIBUTING.md: 9 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -104,17 +104,20 @@ This repository adheres to the following coding standards for consistency: Before opening a PR, ensure your changes are working correctly: 1. **Set Up Test Environment**: - Ensure all required dependencies are installed. - Use a local Kubernetes (e.g., Kind) environment to test deployments. - Two or more operators, each with its own Kubernetes cluster (k3s on VMs works: `playbooks/infrastructure/k3s/deploy.yml`), in an inventory based on `inventory/r2.example.yml`. 2. **Run Playbook Tests**: - Example: 2. **Run the Scenario and its Tests**: ```bash ansible-playbook playbooks/scenarios/all_in_one/deploy.yml -e @secrets.yml ansible-playbook -i inventory/r2.local.yml playbooks/scenarios/r2_existing_cluster/deploy.yml ansible-playbook -i inventory/r2.local.yml playbooks/scenarios/r2_existing_cluster/federate.yml ansible-playbook -i inventory/r2.local.yml playbooks/scenarios/r2_existing_cluster/e2e.yml ``` Run `deploy.yml` and `federate.yml` twice: the second run must report no changes. 3. **Verify Cleanup**: - Set `state: absent` and ensure components undeploy cleanly. - `undeploy.yml` removes the release and keeps the key Secrets and database volume. 4. **Run Ansible Lint**: ```bash Loading Loading
.ansible-lint +0 −2 Changes for .ansible-lint: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -5,9 +5,7 @@ exclude_paths: - .gitlab-ci-local/ - .mypy_cache/ - .venv/ - ansible/secrets.yml - ansible/venv/ - public/ - venv/ skip_list: - var-naming Loading
.gitignore +0 −12 Changes for .gitignore: 0 added lines, 12 removed lines. Original line number Diff line number Diff line # Python virtual environments venv/ ansible/venv/ docs/.venv/ .venv/ __pycache__/ *.pyc Loading @@ -13,15 +12,8 @@ ansible/.ansible/ .ansible/ *.retry ansible_facts/ ansible/secrets.yml ansible/inventory/*.local.yml # Automation folder - contains kubeconfig files generated by ansible automation/ # Generated kubeconfig files **/operator-platform-external-kubeconfig.yaml # IDE .vscode/ .idea/ Loading @@ -42,7 +34,3 @@ Thumbs.db # CI/CD .gitlab-ci-local/ # MkDocs build output public/ site/
.gitlab-ci.yml +7 −35 Changes for .gitlab-ci.yml: 7 added lines, 35 removed lines. Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ image: python:3.12-slim stages: - lint - test - docs - deploy variables: ANSIBLE_CONFIG: ansible/ansible.cfg Loading @@ -31,12 +29,12 @@ secret-scan: - apk add --no-cache git script: - | if git grep -nE 'g[l]pat-|g[h]p_|github_[p]at_' -- . ':!ansible/secrets.example.yml'; then if git grep -nE 'g[l]pat-|g[h]p_|github_[p]at_' -- .; then exit 1 fi begin_marker='-----BEGIN ' key_marker='PRIVATE KEY' if git grep -n -e "$begin_marker" -- . ':!ansible/secrets.example.yml' | grep -E "$key_marker"; then if git grep -n -e "$begin_marker" -- . | grep -E "$key_marker"; then exit 1 fi Loading @@ -58,38 +56,12 @@ syntax-check: script: - cd ansible - chmod 700 . - ansible-playbook -i inventory/hosts.yml --syntax-check playbooks/scenarios/full_oop/deploy-kubernetes.yml - ansible-playbook -i inventory/hosts.yml --syntax-check playbooks/scenarios/dual_oop/deploy-kubernetes.yml - ansible-playbook -i inventory/hosts.yml --syntax-check playbooks/scenarios/full_oop_existing_cluster/deploy.yml - | for playbook in playbooks/infrastructure/k3s/*.yml playbooks/scenarios/r2_existing_cluster/*.yml; do ansible-playbook -i inventory/r2.example.yml --syntax-check "$playbook" done python-smoke: stage: test script: - python3 -m py_compile docker-local-deployment/prepare_kubeconfig.py docs: stage: docs script: - python3 --version - pip --version 2>/dev/null || { python3 -m venv --without-pip .venv && source .venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3; } - pip install --upgrade pip - pip install -r docs/requirements.txt - mkdocs build --strict artifacts: paths: - public expire_in: 1 week pages: stage: deploy script: - python3 --version - pip --version 2>/dev/null || { python3 -m venv --without-pip .venv && source .venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3; } - pip install --upgrade pip - pip install -r docs/requirements.txt - mkdocs build --strict artifacts: paths: - public rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - python3 -m py_compile ansible/roles/oop-platform/files/fm_partners.py ansible/tests/r2_e2e/*.py
.yamllint +0 −2 Changes for .yamllint: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -7,9 +7,7 @@ ignore: | .gitlab-ci-local/ .mypy_cache/ .venv/ ansible/secrets.yml ansible/venv/ public/ venv/ rules: Loading
CONTRIBUTING.md +9 −6 Changes for CONTRIBUTING.md: 9 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -104,17 +104,20 @@ This repository adheres to the following coding standards for consistency: Before opening a PR, ensure your changes are working correctly: 1. **Set Up Test Environment**: - Ensure all required dependencies are installed. - Use a local Kubernetes (e.g., Kind) environment to test deployments. - Two or more operators, each with its own Kubernetes cluster (k3s on VMs works: `playbooks/infrastructure/k3s/deploy.yml`), in an inventory based on `inventory/r2.example.yml`. 2. **Run Playbook Tests**: - Example: 2. **Run the Scenario and its Tests**: ```bash ansible-playbook playbooks/scenarios/all_in_one/deploy.yml -e @secrets.yml ansible-playbook -i inventory/r2.local.yml playbooks/scenarios/r2_existing_cluster/deploy.yml ansible-playbook -i inventory/r2.local.yml playbooks/scenarios/r2_existing_cluster/federate.yml ansible-playbook -i inventory/r2.local.yml playbooks/scenarios/r2_existing_cluster/e2e.yml ``` Run `deploy.yml` and `federate.yml` twice: the second run must report no changes. 3. **Verify Cleanup**: - Set `state: absent` and ensure components undeploy cleanly. - `undeploy.yml` removes the release and keeps the key Secrets and database volume. 4. **Run Ansible Lint**: ```bash Loading