-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1159 from rabi/node_selection_tests
Add doc and kuttl test for ansible job node selection
- Loading branch information
Showing
3 changed files
with
131 additions
and
0 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
103 changes: 103 additions & 0 deletions
103
tests/kuttl/tests/dataplane-deploy-no-nodes-test/07-assert.yaml
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,103 @@ | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
generation: 1 | ||
labels: | ||
app: openstackansibleee | ||
openstackdataplanedeployment: edpm-compute-node-selection | ||
openstackdataplanenodeset: edpm-compute-no-nodes | ||
openstackdataplaneservice: configure-os | ||
name: configure-os-edpm-compute-node-selection-edpm-compute-no-nodes | ||
namespace: openstack-kuttl-tests | ||
ownerReferences: | ||
- apiVersion: dataplane.openstack.org/v1beta1 | ||
blockOwnerDeletion: true | ||
controller: true | ||
kind: OpenStackDataPlaneDeployment | ||
name: edpm-compute-node-selection | ||
spec: | ||
backoffLimit: 6 | ||
completionMode: NonIndexed | ||
completions: 1 | ||
manualSelector: false | ||
parallelism: 1 | ||
podReplacementPolicy: TerminatingOrFailed | ||
suspend: false | ||
template: | ||
metadata: | ||
annotations: | ||
k8s.v1.cni.cncf.io/networks: '[]' | ||
creationTimestamp: null | ||
labels: | ||
app: openstackansibleee | ||
batch.kubernetes.io/job-name: configure-os-edpm-compute-node-selection-edpm-compute-no-nodes | ||
openstackdataplanedeployment: edpm-compute-node-selection | ||
openstackdataplanenodeset: edpm-compute-no-nodes | ||
openstackdataplaneservice: configure-os | ||
spec: | ||
containers: | ||
- args: | ||
- ansible-runner | ||
- run | ||
- /runner | ||
- -p | ||
- osp.edpm.configure_os | ||
- -i | ||
- configure-os-edpm-compute-node-selection-edpm-compute-no-nodes | ||
env: | ||
- name: ANSIBLE_FORCE_COLOR | ||
value: "True" | ||
- name: RUNNER_PLAYBOOK | ||
value: |2+ | ||
osp.edpm.configure_os | ||
- name: RUNNER_EXTRA_VARS | ||
value: |2+ | ||
edpm_override_hosts: edpm-compute-no-nodes | ||
edpm_service_type: configure-os | ||
edpm_services_override: [configure-os] | ||
imagePullPolicy: Always | ||
name: configure-os-edpm-compute-node-selection-edpm-compute-no-nodes | ||
resources: {} | ||
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
volumeMounts: | ||
- mountPath: /runner/env/ssh_key | ||
name: ssh-key | ||
subPath: ssh_key | ||
- mountPath: /runner/inventory/hosts | ||
name: inventory | ||
subPath: inventory | ||
dnsPolicy: ClusterFirst | ||
nodeSelector: | ||
nodeWith: ctlplane | ||
restartPolicy: Never | ||
schedulerName: default-scheduler | ||
securityContext: {} | ||
serviceAccount: edpm-compute-no-nodes | ||
serviceAccountName: edpm-compute-no-nodes | ||
terminationGracePeriodSeconds: 30 | ||
volumes: | ||
- name: ssh-key | ||
secret: | ||
defaultMode: 420 | ||
items: | ||
- key: ssh-privatekey | ||
path: ssh_key | ||
secretName: dataplane-ansible-ssh-private-key-secret | ||
- name: inventory | ||
secret: | ||
defaultMode: 420 | ||
items: | ||
- key: inventory | ||
path: inventory | ||
secretName: dataplanenodeset-edpm-compute-no-nodes | ||
status: | ||
active: 1 | ||
terminating: 0 | ||
uncountedTerminatedPods: {} |
11 changes: 11 additions & 0 deletions
11
tests/kuttl/tests/dataplane-deploy-no-nodes-test/07-dataplane-deploy-node-selector.yaml
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,11 @@ | ||
apiVersion: dataplane.openstack.org/v1beta1 | ||
kind: OpenStackDataPlaneDeployment | ||
metadata: | ||
name: edpm-compute-node-selection | ||
spec: | ||
nodeSets: | ||
- edpm-compute-no-nodes | ||
ansibleJobNodeSelector: | ||
nodeWith: ctlplane | ||
servicesOverride: | ||
- configure-os |