Skip to content

Commit

Permalink
Merge branch 'main' into cronjob-automation-development
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnil-bobade27 authored Jan 20, 2023
2 parents ceb415d + facf1b8 commit 77fb081
Show file tree
Hide file tree
Showing 12 changed files with 397 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ This repository consists of additional ansible playbooks for the following:
1. Configure and run verification-tests
1. Enabling Stream Control Transmission Protocol (SCTP) and run e2e
1. Cronjob validation
1. Deploy Kubernetes NMState Operator and run e2e

## Assumptions:

Expand Down
12 changes: 12 additions & 0 deletions examples/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,15 @@ sctp_workplace: "/tmp/sctp"
service_type: NodePort
sctp_verification_tests: false
sctp_cleanup: true

# ocp-nmstate-operator vars
nmstate_enabled: false
nmstate_install_operator: true
nmstate_catalogsource_image: ""
nmstate_upgrade_channel: "stable"
nmstate_directory: "/tmp/nmstate"
nmstate_golang_tarball: "https://go.dev/dl/go1.18.6.linux-ppc64le.tar.gz"
nmstate_e2e: false
nmstate_e2e_git_repository: "https://github.com/openshift/kubernetes-nmstate.git"
nmstate_git_branch: "master"
nmstate_cleanup: true
11 changes: 11 additions & 0 deletions examples/nmstate_vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
nmstate_enabled: false
nmstate_install_operator: true
nmstate_catalogsource_image: ""
nmstate_upgrade_channel: "stable"
nmstate_directory: "/tmp/nmstate"
nmstate_golang_tarball: "https://go.dev/dl/go1.18.6.linux-ppc64le.tar.gz"
nmstate_e2e: false
nmstate_e2e_git_repository: "https://github.com/openshift/kubernetes-nmstate.git"
nmstate_git_branch: "master"
nmstate_cleanup: true
3 changes: 3 additions & 0 deletions playbooks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,6 @@

- import_playbook: ocp-sctp.yml
when: sctp_enabled is defined and sctp_enabled

- import_playbook: ocp-nmstate-operator.yml
when: nmstate_enabled is defined and nmstate_enabled
7 changes: 7 additions & 0 deletions playbooks/ocp-nmstate-operator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: Installation of the NMState Operator and run e2e
hosts: bastion
tasks:
- name: Deploy NMState Operator
include_role:
name: ocp-nmstate-operator
56 changes: 56 additions & 0 deletions playbooks/roles/ocp-nmstate-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ocp-nmstate-operator
=========

This role is used to deploy Kubernetes NMState Operator and run e2e tests.

Requirements
------------

- OCP 4.x healthy cluster on PowerVC.
- To run e2e, attach two additional networks to the worker nodes.
- OCP secret with name ***podman-secret*** in the default namespace which is used for global secret update and has following keys:
***username***, ***password*** and ***registry***

Role Variables
--------------

| Variable | Required | Default | Comments |
|------------------------------|----------|----------------|-----------------------------------------------------------|
| nmstate_enabled | no | false | Set it to true to run this playbook |
| nmstate_install_operator | no | true | Set it to true to install the Kubernetes NMState Operator |
| nmstate_catalogsource_image | no | "" | Custom catalog source index image for Kubernetes NMState Operator. If not defined, default `redhat-operators` catalog source will be used |
| nmstate_upgrade_channel | no | stable | Operator upgrade channel |
| nmstate_directory | no | `/tmp/nmstate` | Working directory for Kubernetes NMState Operator |
| nmstate_golang_tarball | no | https://go.dev/dl/go1.18.6.linux-ppc64le.tar.gz | HTTPS URL for golang tarball |
| nmstate_e2e | no | false | Set it to true to run e2e |
| nmstate_e2e_git_repository | no | https://github.com/openshift/kubernetes-nmstate.git | Git respository for e2e tests |
| nmstate_git_branch | no | master | Git branch for e2e |
| nmstate_cleanup | no | true | Flag is used to clean Kubernetes NMState Operator resources |


Dependencies
------------

- None

Example Playbook
----------------
```
---
- name: Installation of the NMState Operator and run e2e
hosts: bastion
tasks:
- name: Deploy NMState Operator
include_role:
name: ocp-nmstate-operator
```

License
-------

See LICENCE.txt

Author Information
------------------

[email protected]
13 changes: 13 additions & 0 deletions playbooks/roles/ocp-nmstate-operator/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# defaults file for playbooks/roles/ocp-nmstate-operator
nmstate_enabled: false
nmstate_install_operator: true
nmstate_catalogsource_image: ""
nmstate_catalogsource: "redhat-operators"
nmstate_upgrade_channel: "stable"
nmstate_directory: "/tmp/nmstate"
nmstate_golang_tarball: "https://go.dev/dl/go1.18.6.linux-ppc64le.tar.gz"
nmstate_e2e: false
nmstate_e2e_git_repository: "https://github.com/openshift/kubernetes-nmstate.git"
nmstate_git_branch: "master"
nmstate_cleanup: true
Loading

0 comments on commit 77fb081

Please sign in to comment.