-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case for additional root apps config map
The list of teams in the config map should never contain the team owning the cluster, since that team keeps the "default" root app named `root` and the default app project named `syn`. Additionally, we don't want to generate a root app and app project for teams which are listed in the parameter but which don't have any component instances assigned. The test case is setup to have a structure in parameter `syn` which covers the cases outlined above. Rendered from template version: main (ff9d5a8)
- Loading branch information
Showing
12 changed files
with
198 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: syn-admin | ||
name: syn-admin | ||
rules: | ||
- apiGroups: | ||
- '*' | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' | ||
- nonResourceURLs: | ||
- '*' | ||
verbs: | ||
- '*' | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: steward | ||
name: steward | ||
namespace: syn | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: syn-steward | ||
name: syn-steward | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: syn-admin | ||
subjects: | ||
- kind: ServiceAccount | ||
name: steward | ||
namespace: syn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
data: | ||
token: '' | ||
kind: Secret | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: steward | ||
name: steward | ||
namespace: syn | ||
stringData: | ||
token: t-silent-test-1234/c-green-test-1234/steward/token | ||
type: Opaque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: {} | ||
labels: | ||
app.kubernetes.io/managed-by: syn | ||
app.kubernetes.io/name: steward | ||
name: steward | ||
namespace: syn | ||
spec: | ||
minReadySeconds: 30 | ||
replicas: 1 | ||
revisionHistoryLimit: 10 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/managed-by: syn | ||
app.kubernetes.io/name: steward | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 25% | ||
maxUnavailable: 25% | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
annotations: {} | ||
labels: | ||
app.kubernetes.io/managed-by: syn | ||
app.kubernetes.io/name: steward | ||
spec: | ||
containers: | ||
- args: [] | ||
env: | ||
- name: STEWARD_API | ||
value: https://api.syn.vshn.net/ | ||
- name: STEWARD_ARGO_IMAGE | ||
value: quay.io/argoproj/argocd:v2.9.22@sha256:fa45cd9a6994ecedcd439425c202d64f097a700531f24db28daaad9d67c231c5 | ||
- name: STEWARD_CLUSTER_ID | ||
value: c-green-test-1234 | ||
- name: STEWARD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.namespace | ||
- name: STEWARD_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
key: token | ||
name: steward | ||
image: docker.io/projectsyn/steward:v0.11.1@sha256:dba13cfdfdf6c1db4ed7bbef109d44ab1d6b16fa70e1835c33b97b9ae64b1af9 | ||
imagePullPolicy: Always | ||
name: steward | ||
ports: [] | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 64Mi | ||
requests: | ||
cpu: 100m | ||
memory: 32Mi | ||
securityContext: | ||
runAsNonRoot: true | ||
stdin: false | ||
tty: false | ||
volumeMounts: [] | ||
imagePullSecrets: [] | ||
initContainers: [] | ||
priorityClassName: system-cluster-critical | ||
serviceAccountName: steward | ||
terminationGracePeriodSeconds: 30 | ||
volumes: [] |
10 changes: 10 additions & 0 deletions
10
tests/golden/syn-teams/steward/steward/20_additional_facts.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
data: {} | ||
kind: ConfigMap | ||
metadata: | ||
annotations: {} | ||
labels: | ||
app.kubernetes.io/managed-by: syn | ||
app.kubernetes.io/name: steward | ||
name: additional-facts | ||
namespace: syn |
11 changes: 11 additions & 0 deletions
11
tests/golden/syn-teams/steward/steward/20_additional_root_apps.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
data: | ||
teams: '["cool-glade","shy-thunder"]' | ||
kind: ConfigMap | ||
metadata: | ||
annotations: {} | ||
labels: | ||
app.kubernetes.io/managed-by: syn | ||
app.kubernetes.io/name: steward | ||
name: additional-root-apps | ||
namespace: syn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
parameters: | ||
syn: | ||
owner: sparkling-sound | ||
teams: | ||
cool-glade: | ||
instances: | ||
- keycloak-dev | ||
- keycloak-prod | ||
purple-smoke: | ||
instances: | ||
- ~rook-ceph | ||
shy-thunder: | ||
instances: | ||
- cert-manager | ||
- metallb | ||
sparkling-sound: | ||
instances: | ||
- argocd |