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 3b4e44f
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 20 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: 'schedar-e2e',
},
],
},
} else {}
);

{
appcat: app,
Expand Down
22 changes: 11 additions & 11 deletions component/component/rbac_e2e.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ local kube = import 'lib/kube.libjsonnet';
local inv = kap.inventory();
local params = inv.parameters.appcat;

local e2eNs = kube.Namespace('appcat-e2e') + {
local e2eNs = kube.Namespace('schedar-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',
namespace: 'schedar-e2e',
},
};

local e2eRoleBinding = kube.RoleBinding('appcat-e2e') + {
local e2eRoleBinding = kube.RoleBinding('schedar-e2e') + {
metadata+: {
namespace: 'appcat-e2e',
namespace: 'schedar-e2e',
},
roleRef_: kube.ClusterRole('admin'),
roleRef_: kube.ClusterRole('gitlab-ci'),
subjects_: [ e2eSA ],
};

Expand All @@ -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',
namespace: 'schedar-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

0 comments on commit 3b4e44f

Please sign in to comment.