Skip to content

Commit 56a0e1c

Browse files
author
B&R
committed
wip: Initial kuttl integration
1 parent 8a2339e commit 56a0e1c

10 files changed

+69
-40
lines changed

.env

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
ENV_CLUSTER_NAME=rkt
2-
ENV_NS=default
3-
ENV_APP_SVC=my-service-name
2+
ENV_NS=wp
3+
ENV_APP_SVC=wordpress-hardened
44
ENV_PORT_FORWARD=8050:8080
5+
6+
ENV_SKAFFOLD_DEPLOY_DEPS=true
7+
ENV_SKAFFOLD_DEPLOY_APP=false

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/.build/*
2+
/kubeconfig

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ build:
66
run:
77
docker run --rm --name wp-riotkit -p 8090:8080 ${IMAGE}
88

9+
integration-test:
10+
kuttl test
11+
912
test: test_installed test_installs_plugins
1013

1114
test_installed:

skaffold.yaml

+29-37
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,21 @@ profiles:
2121
statusCheckDeadlineSeconds: 120
2222
helm:
2323
releases:
24-
# - name: server
25-
# chartPath: helm/backup-repository-server
26-
# recreatePods: true
27-
# namespace: backups
28-
# createNamespace: true
29-
# valuesFiles:
30-
# - helm/examples/backup-repository-ci.values.yaml
31-
# setValueTemplates:
32-
# installCRD: "false"
33-
# image.repository: 'bmt-registry:5000/backup-repository'
34-
# image.tag: '{{.IMAGE_TAG}}'
35-
# terminationGracePeriodSeconds: 1
36-
# env.GIN_MODE: "debug"
24+
- name: wp
25+
chartPath: helm/backup-repository-server
26+
recreatePods: true
27+
namespace: backups
28+
createNamespace: true
29+
setValueTemplates:
30+
31+
32+
3733
portForward:
38-
# - resourceType: service
39-
# resourceName: server-backup-repository-server
40-
# namespace: backups
41-
# port: 8080
42-
# localPort: 8050
34+
- resourceType: service
35+
resourceName: server-backup-repository-server
36+
namespace: wp
37+
port: 8080
38+
localPort: 8050
4339

4440

4541
- name: deps
@@ -48,22 +44,18 @@ profiles:
4844
statusCheckDeadlineSeconds: 120
4945
helm:
5046
releases:
51-
# - name: postgresql
52-
# repo: https://charts.bitnami.com/bitnami
53-
# version: 12.1.2
54-
# remoteChart: postgresql
55-
# namespace: db
56-
# createNamespace: true
57-
# wait: true
58-
# valuesFiles:
59-
# - helm/examples/postgresql.values.yaml
60-
#
61-
# - name: minio
62-
# repo: https://charts.min.io/
63-
# version: 5.0.1
64-
# remoteChart: minio
65-
# namespace: storage
66-
# createNamespace: true
67-
# wait: true
68-
# valuesFiles:
69-
# - helm/examples/minio.values.yaml
47+
- name: mariadb
48+
repo: https://charts.bitnami.com/bitnami
49+
version: 11.5.4
50+
remoteChart: mariadb
51+
namespace: db
52+
createNamespace: true
53+
wait: true
54+
setValueTemplates:
55+
fullnameOverride: mariadb
56+
architecture: standalone
57+
auth.rootPassword: "lgbt-1312"
58+
auth.password: "lgbt-1312"
59+
auth.database: "riotkit"
60+
auth.username: "riotkit"
61+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
- command:
6+
- command: helm upgrade --install wp ../../../helm/wordpress-hardened --values ./values.yaml -n ${NAMESPACE}
7+

tests/e2e/preinstalls-with-plugins/00-setup.yaml

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: v1
3+
kind: Pod
4+
status:
5+
phase: Running
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
- command: "/bin/bash -c 'kubectl port-forward svc/wp-wph -n ${NAMESPACE} 8050:80 &'"
6+
- command: "curl 127.0.0.1:8050 -vvv"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
- command: "curl 127.0.0.1:8050 -vvv"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
db:
2+
user: wordpress
3+
name: wordpress
4+
host: mariadb.db.svc.cluster.local
5+
port: 3306
6+
password:
7+
secretName: db-credentials
8+
secretKey: password

0 commit comments

Comments
 (0)