Skip to content

Commit 7bcf4d7

Browse files
committed
Adding openstackclient in kuttl
1 parent cad552c commit 7bcf4d7

File tree

4 files changed

+79
-0
lines changed

4 files changed

+79
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ./openstackclient.yaml
6+
7+
patches:
8+
- patch: |-
9+
- op: replace
10+
path: /spec/containers/0/image
11+
value: quay.io/podified-antelope-centos9/openstack-openstackclient:current-podified
12+
target:
13+
kind: Pod
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# This pod assumes at least mariadb && keystone are running in the ctlplane
2+
# and the associated openstack secrets (osp-secret and openstack-config) have
3+
# been created, as well as the configmap where clouds.yaml is stored.
4+
# It gets a cli that can be used to interact with the deployed components.
5+
apiVersion: v1
6+
kind: Pod
7+
metadata:
8+
annotations:
9+
openshift.io/scc: anyuid
10+
labels:
11+
app: openstackclient
12+
name: openstackclient
13+
spec:
14+
containers:
15+
- args:
16+
- --single-child
17+
- --
18+
- /bin/bash
19+
- -c
20+
- /bin/sleep infinity
21+
command:
22+
- /bin/dumb-init
23+
env:
24+
- name: OS_CLOUD
25+
value: default
26+
imagePullPolicy: IfNotPresent
27+
name: openstackclient
28+
resources: {}
29+
securityContext:
30+
capabilities:
31+
drop:
32+
- ALL
33+
runAsGroup: 42401
34+
runAsNonRoot: true
35+
runAsUser: 42401
36+
allowPrivilegeEscalation: false
37+
seccompProfile:
38+
type: RuntimeDefault
39+
terminationMessagePath: /dev/termination-log
40+
terminationMessagePolicy: File
41+
volumeMounts:
42+
- mountPath: /etc/openstack/clouds.yaml
43+
name: openstack-config
44+
subPath: clouds.yaml
45+
- mountPath: /etc/openstack/secure.yaml
46+
name: openstack-config-secret
47+
subPath: secure.yaml
48+
dnsPolicy: ClusterFirst
49+
enableServiceLinks: true
50+
volumes:
51+
- configMap:
52+
defaultMode: 420
53+
name: openstack-config
54+
name: openstack-config
55+
- name: openstack-config-secret
56+
secret:
57+
defaultMode: 420
58+
secretName: openstack-config-secret

tests/kuttl/common/assert_sample_deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,3 +361,9 @@ commands:
361361
exit 1
362362
fi
363363
exit 0
364+
- script: |
365+
n_images=$(oc exec -n $NAMESPACE openstackclient -- openstack image list -f value --tag amphora-image | wc -l)
366+
if [ "$n_images" != "0" ]; then
367+
exit 0
368+
fi
369+
exit 1

tests/kuttl/tests/octavia_scale/00-test-resources.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ commands:
1717
default:
1818
replicas: 1
1919
'
20+
- script: |
21+
oc kustomize ../../../../config/samples/openstackclient | oc apply -n $NAMESPACE -f -

0 commit comments

Comments
 (0)