-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6f6591
commit c54806b
Showing
8 changed files
with
399 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
molecule/remote-cluster-resources-test/destroy-remote-cluster-resources-test.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
- name: Destroy | ||
hosts: localhost | ||
connection: local | ||
collections: | ||
- kubernetes.core | ||
|
||
- name: Include the base destroy play to destroy the Kiali CR and operator | ||
import_playbook: ../default/destroy.yml | ||
|
||
- name: Delete the test namespaces | ||
import_playbook: ./process-namespaces.yml | ||
vars: | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: kiali.io/v1alpha1 | ||
kind: Kiali | ||
metadata: | ||
name: kiali | ||
spec: | ||
version: {{ kiali.spec_version }} | ||
auth: | ||
strategy: {{ kiali.auth_strategy }} | ||
deployment: | ||
namespace: {{ kiali.install_namespace }} | ||
cluster_wide_access: {{ kiali.cluster_wide_access|bool }} | ||
remote_cluster_resources_only: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: $DORP | ||
platforms: | ||
- name: default | ||
groups: | ||
- k8s | ||
provisioner: | ||
name: ansible | ||
config_options: | ||
defaults: | ||
callbacks_enabled: junit | ||
playbooks: | ||
destroy: ./destroy-remote-cluster-resources-test.yml | ||
prepare: ./prepare-remote-cluster-resources-test.yml | ||
cleanup: ../default/cleanup.yml | ||
inventory: | ||
group_vars: | ||
all: | ||
cr_file_path: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/molecule/remote-cluster-resources-test/kiali-cr.yaml" | ||
cr_namespace: "{{ 'kiali-operator' if (lookup('env', 'MOLECULE_OPERATOR_INSTALLER') | default('helm', True) == 'helm') else 'istio-system' }}" # if external operator, assume CR must go in control plane namespace | ||
wait_retries: "{{ lookup('env', 'MOLECULE_WAIT_RETRIES') | default('360', True) }}" | ||
istio: | ||
control_plane_namespace: istio-system | ||
kiali: | ||
spec_version: "{{ lookup('env', 'MOLECULE_KIALI_CR_SPEC_VERSION') | default('default', True) }}" | ||
install_namespace: istio-system | ||
cluster_wide_access: true | ||
auth_strategy: anonymous | ||
operator_namespace: "{{ 'kiali-operator' if (lookup('env', 'MOLECULE_OPERATOR_INSTALLER') | default('helm', True) == 'helm') else ('openshift-operators' if (query('kubernetes.core.k8s', kind='Namespace', resource_name='openshift-operators') | length > 0) else 'operators') }}" # if external operator, assume operator is in OLM location | ||
operator_image_name: "{{ 'image-registry.openshift-image-registry.svc:5000/kiali/kiali-operator' if lookup('env', 'MOLECULE_KIALI_OPERATOR_IMAGE_NAME') == 'dev' else (lookup('env', 'MOLECULE_KIALI_OPERATOR_IMAGE_NAME')|default('quay.io/kiali/kiali-operator', True)) }}" | ||
operator_version: "{{ lookup('env', 'MOLECULE_KIALI_OPERATOR_IMAGE_VERSION')|default('latest', True) }}" | ||
operator_watch_namespace: kiali-operator | ||
operator_cluster_role_creator: "true" | ||
operator_image_pull_policy: "{{ lookup('env', 'MOLECULE_KIALI_OPERATOR_IMAGE_PULL_POLICY')|default('Always', True) }}" | ||
scenario: | ||
name: remote-cluster-resources-test | ||
test_sequence: | ||
- prepare | ||
- converge | ||
- destroy |
15 changes: 15 additions & 0 deletions
15
molecule/remote-cluster-resources-test/prepare-remote-cluster-resources-test.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- name: Prepare | ||
hosts: localhost | ||
connection: local | ||
collections: | ||
- kubernetes.core | ||
|
||
- name: Create the test namespaces | ||
import_playbook: ./process-namespaces.yml | ||
vars: | ||
state: present | ||
|
||
- name: Include the base prepare play to create the first kiali CR | ||
import_playbook: ../default/prepare.yml | ||
vars: | ||
wait_for_kiali_pod_after_prepare: false |
36 changes: 36 additions & 0 deletions
36
molecule/remote-cluster-resources-test/process-namespaces.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
- name: "Process Test Namespaces [state={{ state }}]" | ||
hosts: localhost | ||
connection: local | ||
collections: | ||
- kubernetes.core | ||
|
||
tasks: | ||
- k8s: | ||
state: "{{ state }}" | ||
definition: | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: remote-cluster-resources-test-1 | ||
labels: | ||
discoverySelectorLabel1: test | ||
test: kiali | ||
- k8s: | ||
state: "{{ state }}" | ||
definition: | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: remote-cluster-resources-test-2 | ||
labels: | ||
discoverySelectorLabel2: matchme | ||
test: kiali | ||
- k8s: | ||
state: "{{ state }}" | ||
definition: | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: remote-cluster-resources-test-x | ||
labels: | ||
test: kiali |