Skip to content

Commit 7285f66

Browse files
Added app-proxy as a component
1 parent 096f55f commit 7285f66

File tree

8 files changed

+235
-0
lines changed

8 files changed

+235
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: cap-app-proxy-cm
5+
data:
6+
argoCdUsername: admin
7+
env: production
8+
argoWorkflowsInsecure: "true"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
name: cap-app-proxy-binding
5+
roleRef:
6+
apiGroup: rbac.authorization.k8s.io
7+
kind: ClusterRole
8+
name: argo-server-cluster-role
9+
subjects:
10+
- kind: ServiceAccount
11+
name: cap-app-proxy
12+
namespace: default
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app: cap-app-proxy
6+
name: cap-app-proxy
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: cap-app-proxy
11+
template:
12+
metadata:
13+
labels:
14+
app: cap-app-proxy
15+
spec:
16+
serviceAccountName: cap-app-proxy
17+
containers:
18+
- env:
19+
- name: ARGO_CD_URL
20+
valueFrom:
21+
configMapKeyRef:
22+
name: cap-app-proxy-cm
23+
key: argoCdUrl
24+
optional: true
25+
- name: ARGO_CD_USERNAME
26+
valueFrom:
27+
configMapKeyRef:
28+
name: cap-app-proxy-cm
29+
key: argoCdUsername
30+
optional: true
31+
- name: ARGO_CD_PASSWORD
32+
valueFrom:
33+
secretKeyRef:
34+
name: argocd-initial-admin-secret
35+
key: password
36+
- name: ARGO_WORKFLOWS_INSECURE
37+
valueFrom:
38+
configMapKeyRef:
39+
name: cap-app-proxy-cm
40+
key: argoWorkflowsInsecure
41+
optional: true
42+
- name: ARGO_WORKFLOWS_URL
43+
valueFrom:
44+
configMapKeyRef:
45+
name: cap-app-proxy-cm
46+
key: argoWorkflowsUrl
47+
optional: true
48+
- name: CF_HOST
49+
valueFrom:
50+
configMapKeyRef:
51+
name: codefresh-cm
52+
key: base-url
53+
optional: true
54+
- name: CORS
55+
valueFrom:
56+
configMapKeyRef:
57+
name: codefresh-cm
58+
key: base-url
59+
optional: true
60+
- name: ENV
61+
valueFrom:
62+
configMapKeyRef:
63+
name: cap-app-proxy-cm
64+
key: env
65+
optional: true
66+
- name: GRAPHQL_DEBUG
67+
valueFrom:
68+
configMapKeyRef:
69+
name: cap-app-proxy-cm
70+
key: graphqlDebug
71+
optional: true
72+
- name: GRAPHQL_PLAYGROUND
73+
valueFrom:
74+
configMapKeyRef:
75+
name: cap-app-proxy-cm
76+
key: graphqlPlayground
77+
optional: true
78+
- name: NAMESPACE
79+
valueFrom:
80+
fieldRef:
81+
fieldPath: metadata.namespace
82+
- name: PORT
83+
valueFrom:
84+
configMapKeyRef:
85+
name: cap-app-proxy-cm
86+
key: port
87+
optional: true
88+
- name: REPOS_DIR
89+
valueFrom:
90+
configMapKeyRef:
91+
name: cap-app-proxy-cm
92+
key: reposDir
93+
optional: true
94+
- name: RUNTIME_NAME
95+
valueFrom:
96+
configMapKeyRef:
97+
name: cap-app-proxy-cm
98+
key: runtimeName
99+
optional: true
100+
- name: RUNTIME_TOKEN
101+
valueFrom:
102+
secretKeyRef:
103+
name: codefresh-token
104+
key: token
105+
- name: RUNTIME_STORE_IV
106+
valueFrom:
107+
secretKeyRef:
108+
name: codefresh-token
109+
key: encryptionIV
110+
optional: true
111+
- name: STORE_BACKEND
112+
valueFrom:
113+
configMapKeyRef:
114+
name: cap-app-proxy-cm
115+
key: storeBackend
116+
optional: true
117+
- name: STRIP_PREFIX
118+
valueFrom:
119+
configMapKeyRef:
120+
name: cap-app-proxy-cm
121+
key: stripPrefix
122+
optional: true
123+
image: quay.io/codefresh/cap-app-proxy
124+
imagePullPolicy: Always
125+
name: cap-app-proxy
126+
readinessProbe:
127+
initialDelaySeconds: 10
128+
timeoutSeconds: 10
129+
httpGet:
130+
port: http
131+
path: /api/readyz
132+
livenessProbe:
133+
initialDelaySeconds: 10
134+
timeoutSeconds: 10
135+
failureThreshold: 10
136+
httpGet:
137+
port: http
138+
path: /api/healthz
139+
ports:
140+
- name: http
141+
containerPort: 80
142+
resources:
143+
requests:
144+
memory: "256Mi"
145+
cpu: "100m"
146+
limits:
147+
memory: "2048Mi"
148+
cpu: "2"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: RoleBinding
3+
metadata:
4+
labels:
5+
app: cap-app-proxy
6+
name: cap-app-proxy
7+
roleRef:
8+
apiGroup: rbac.authorization.k8s.io
9+
kind: Role
10+
name: cap-app-proxy
11+
subjects:
12+
- kind: ServiceAccount
13+
name: cap-app-proxy
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
labels:
5+
app: cap-app-proxy
6+
name: cap-app-proxy
7+
rules:
8+
- apiGroups:
9+
- ""
10+
resources:
11+
- secrets
12+
- configmap
13+
verbs:
14+
- get
15+
- create
16+
- delete
17+
- update
18+
- patch
19+
- list
20+
- watch
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
labels:
5+
app: cap-app-proxy
6+
name: cap-app-proxy
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
app: cap-app-proxy
6+
name: cap-app-proxy
7+
spec:
8+
selector:
9+
app: cap-app-proxy
10+
ports:
11+
- name: http
12+
port: 3017
13+
protocol: TCP
14+
targetPort: http
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
images:
4+
- name: quay.io/codefresh/cap-app-proxy
5+
newName: quay.io/codefresh/cap-app-proxy
6+
newTag: 1.1075.0
7+
resources:
8+
- app-proxy.deploy.yaml
9+
- app-proxy.svc.yaml
10+
- app-proxy.sa.yaml
11+
- app-proxy.rb.yaml
12+
- app-proxy.crb.yaml
13+
- app-proxy.role.yaml
14+
- app-proxy.cm.yaml

0 commit comments

Comments
 (0)