Skip to content

Commit

Permalink
Adjust e2e component
Browse files Browse the repository at this point in the history
  • Loading branch information
Kidswiss committed Mar 27, 2024
1 parent 389f4ca commit c7264ca
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 17 deletions.
18 changes: 17 additions & 1 deletion component/component/app.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,23 @@ local inv = kap.inventory();
local params = inv.parameters.appcat;
local argocd = import 'lib/argocd.libjsonnet';

local app = argocd.App('appcat', '');
local app = argocd.App('appcat', '') + (
if params.services.vshn.e2eTests then {
spec+: {
ignoreDifferences+: [
{
group: '',
jsonPointers: [
'/data',
],
kind: 'Secret',
name: 'github-ci-secret',
namespace: 'appcat-e2e',
},
],
},
} else {}
);

{
appcat: app,
Expand Down
10 changes: 5 additions & 5 deletions component/component/rbac_e2e.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ local params = inv.parameters.appcat;
local e2eNs = kube.Namespace('appcat-e2e') + {
metadata+: {
labels+: {
'appuio.io/organization': 'vshn-e2e-tests',
'appuio.io/organization': 'vshn',
},
},
};

local e2eSA = kube.ServiceAccount('appcat-e2e') + {
local e2eSA = kube.ServiceAccount('github-ci') + {
metadata+: {
namespace: 'appcat-e2e',
},
Expand Down Expand Up @@ -41,17 +41,17 @@ local e2eClusterRoleBinding = kube.ClusterRoleBinding('appcat:e2e') {
subjects_: [ e2eSA ],
};

local e2eSAToken = kube.Secret('appcat-e2e-github') + {
local e2eSAToken = kube.Secret('github-ci-secret') + {
metadata+: {
namespace: 'appcat-e2e',
annotations+: {
'kubernetes.io/service-account.name': 'appcat-e2e',
'kubernetes.io/service-account.name': 'github-ci',
'argocd.argoproj.io/compare-options': 'IgnoreExtraneous',
},
},
type: 'kubernetes.io/service-account-token',
};

if params.services.vshn.e2eTests then {
'20_rbac_vshn_e2e_tests': [ e2eNs, e2eSA, e2eRoleBinding, e2eSAToken, e2eClusterRoleBinding, e2eClusterRole ],
'20_rbac_vshn_e2e_tests': [ e2eNs, e2eSA, e2eRoleBinding, e2eClusterRoleBinding, e2eClusterRole, e2eSAToken ],
} else {}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ spec:
apiVersion: v1
data:
providerConfig: minio
proxyEndpoint: host.docker.internal:9443
serviceName: miniobucket
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -64,7 +63,6 @@ spec:
apiVersion: v1
data:
providerConfig: minio-cluster
proxyEndpoint: host.docker.internal:9443
serviceName: miniobucket
kind: ConfigMap
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ spec:
true, "memory": "2Gi"}}, "standard-4": {"size": {"cpu": "1", "disk": "16Gi",
"enabled": true, "memory": "4Gi"}}, "standard-8": {"size": {"cpu": "2",
"disk": "16Gi", "enabled": true, "memory": "8Gi"}}}'
proxyEndpoint: host.docker.internal:9443
quotasEnabled: 'false'
registry_password: ''
registry_username: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ spec:
{"size": {"cpu": "125m", "disk": "16Gi", "enabled": true, "memory": "512Mi"}},
"standard-8": {"size": {"cpu": "2", "disk": "16Gi", "enabled": true, "memory":
"8Gi"}}}'
proxyEndpoint: host.docker.internal:9443
quotasEnabled: 'false'
restoreSA: mariadbrestoreserviceaccount
serviceName: mariadb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,6 @@ spec:
emailAlertingSmtpUsername: [email protected]
externalDatabaseConnectionsEnabled: 'true'
imageTag: v4.61.0
proxyEndpoint: host.docker.internal:9443
quotasEnabled: 'false'
serviceName: postgresql
sgNamespace: stackgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,6 @@ spec:
emailAlertingSmtpUsername: [email protected]
externalDatabaseConnectionsEnabled: 'true'
imageTag: v4.61.0
proxyEndpoint: host.docker.internal:9443
quotasEnabled: 'false'
serviceName: postgresql
sgNamespace: stackgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,6 @@ spec:
emailAlertingSmtpUsername: [email protected]
imageTag: v4.61.0
maintenanceSA: helm-based-service-maintenance
proxyEndpoint: host.docker.internal:9443
quotasEnabled: 'false'
restoreSA: redisrestoreserviceaccount
serviceName: redis
Expand Down
2 changes: 1 addition & 1 deletion component/tests/vshn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parameters:
appcat:

grpcEndpoint: host.docker.internal:9443
proxyFunction: true
proxyFunction: false

quotasEnabled: false
appuioManaged: false
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/kuttl-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: kuttl.dev/v1beta1
kind: TestSuite
testDirs:
- ./test/e2e/
namespace: schedar-e2e
namespace: appcat-e2e
4 changes: 2 additions & 2 deletions tests/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ $(kuttl_bin): | $(go_bin)

.PHONY: .e2e-test
e2e-test: $(kuttl_bin) ## Run e2e tests
@kubectl create namespace schedar-e2e || true
@kubectl create namespace appcat-e2e || true
GOBIN=$(go_bin) $(kuttl_bin) test ./tests/e2e --config ./tests/e2e/kuttl-test.yaml --suppress-log=Events
@rm -f kubeconfig
# kuttl leaves kubeconfig garbage: https://github.com/kudobuilder/kuttl/issues/297

.PHONY: .run-single-e2e
run-single-e2e:
@kubectl create namespace schedar-e2e || true
@kubectl create namespace appcat-e2e || true
GOBIN=$(go_bin) $(kuttl_bin) test ./tests/e2e --config ./tests/e2e/kuttl-test.yaml --suppress-log=Events --test $(test)
@rm -f kubeconfig

Expand Down

0 comments on commit c7264ca

Please sign in to comment.