Skip to content

Commit

Permalink
Generate golden tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan committed Nov 14, 2023
1 parent 5e0c421 commit 3b9b9cc
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 0 deletions.
43 changes: 43 additions & 0 deletions tests/golden/defaults/steward/steward/01_rbac.yaml
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
13 changes: 13 additions & 0 deletions tests/golden/defaults/steward/steward/05_secret.yaml
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
69 changes: 69 additions & 0 deletions tests/golden/defaults/steward/steward/10_deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
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.3.12@sha256:57474c3c31d2e3606e9c7dad2e449e604a48ac8e9aaaa413274aed41e6550e59
- 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.10.0@sha256:97d526bf5493e9dd8923818ff70ae7c778f0b726efbafb1f42f8b6316fd4cd03
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: []
serviceAccountName: steward
terminationGracePeriodSeconds: 30
volumes: []
12 changes: 12 additions & 0 deletions tests/golden/defaults/steward/steward/20_additional_facts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
data:
blub: blub
blubobj: '{"blub":"blub"}'
kind: ConfigMap
metadata:
annotations: {}
labels:
app.kubernetes.io/managed-by: syn
app.kubernetes.io/name: steward
name: additional-facts
namespace: syn

0 comments on commit 3b9b9cc

Please sign in to comment.