Skip to content

Commit

Permalink
Adding openstackclient in kuttl
Browse files Browse the repository at this point in the history
  • Loading branch information
gthiemonge committed Dec 9, 2024
1 parent cad552c commit 7bcf4d7
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
13 changes: 13 additions & 0 deletions config/samples/openstackclient/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ./openstackclient.yaml

patches:
- patch: |-
- op: replace
path: /spec/containers/0/image
value: quay.io/podified-antelope-centos9/openstack-openstackclient:current-podified
target:
kind: Pod
58 changes: 58 additions & 0 deletions config/samples/openstackclient/openstackclient.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This pod assumes at least mariadb && keystone are running in the ctlplane
# and the associated openstack secrets (osp-secret and openstack-config) have
# been created, as well as the configmap where clouds.yaml is stored.
# It gets a cli that can be used to interact with the deployed components.
apiVersion: v1
kind: Pod
metadata:
annotations:
openshift.io/scc: anyuid
labels:
app: openstackclient
name: openstackclient
spec:
containers:
- args:
- --single-child
- --
- /bin/bash
- -c
- /bin/sleep infinity
command:
- /bin/dumb-init
env:
- name: OS_CLOUD
value: default
imagePullPolicy: IfNotPresent
name: openstackclient
resources: {}
securityContext:
capabilities:
drop:
- ALL
runAsGroup: 42401
runAsNonRoot: true
runAsUser: 42401
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/openstack/clouds.yaml
name: openstack-config
subPath: clouds.yaml
- mountPath: /etc/openstack/secure.yaml
name: openstack-config-secret
subPath: secure.yaml
dnsPolicy: ClusterFirst
enableServiceLinks: true
volumes:
- configMap:
defaultMode: 420
name: openstack-config
name: openstack-config
- name: openstack-config-secret
secret:
defaultMode: 420
secretName: openstack-config-secret
6 changes: 6 additions & 0 deletions tests/kuttl/common/assert_sample_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -361,3 +361,9 @@ commands:
exit 1
fi
exit 0
- script: |
n_images=$(oc exec -n $NAMESPACE openstackclient -- openstack image list -f value --tag amphora-image | wc -l)
if [ "$n_images" != "0" ]; then
exit 0
fi
exit 1
2 changes: 2 additions & 0 deletions tests/kuttl/tests/octavia_scale/00-test-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ commands:
default:
replicas: 1
'
- script: |
oc kustomize ../../../../config/samples/openstackclient | oc apply -n $NAMESPACE -f -

0 comments on commit 7bcf4d7

Please sign in to comment.