-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathtemplate-example.yaml
More file actions
141 lines (139 loc) · 3.98 KB
/
template-example.yaml
File metadata and controls
141 lines (139 loc) · 3.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
apiVersion: app.claw.cloud/v1
kind: Template
metadata:
name: # App Name (lowercase)
spec:
title: # App Name
type: official # Template type: official, developer, community
author: ClawCloud Run # Template author
author_id: 180503656 # Template author GitHub ID
date: 2025-04-17 # Template submit date
url: # App official website
gitRepo: # App GitHub url
description: # App description
readme: # App Readme url
icon: # App icon url
templateType: inline
defaults:
app_host:
type: string
value: ${{ random(8) }}
app_name:
type: string
value: appsmith-${{ random(8) }}
inputs:
volume_size:
description: 'save data size (Gi)'
type: string
default: '1'
required: false
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ${{ defaults.app_name }}
annotations:
originImageName: # App docker image
deploy.run.claw.cloud/minReplicas: '1'
deploy.run.claw.cloud/maxReplicas: '1'
labels:
run.claw.cloud/app-deploy-manager: ${{ defaults.app_name }}
app: ${{ defaults.app_name }}
spec:
replicas: 1
revisionHistoryLimit: 1
minReadySeconds: 10
serviceName: ${{ defaults.app_name }}
selector:
matchLabels:
app: ${{ defaults.app_name }}
template:
metadata:
labels:
app: ${{ defaults.app_name }}
spec:
terminationGracePeriodSeconds: 10
containers:
- name: ${{ defaults.app_name }}
image: # App docker image
env: []
resources:
requests:
cpu: 100m
memory: 102Mi
limits:
cpu: 1000m
memory: 1024Mi
command: []
args: []
ports:
- containerPort: 80
imagePullPolicy: IfNotPresent
volumeMounts:
- name: vn-appvn-data
mountPath: /app/data
volumes: []
volumeClaimTemplates:
- metadata:
annotations:
path: /app/data
value: '1'
name: vn-appvn-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: ${{ inputs.volume_size }}Gi
---
apiVersion: v1
kind: Service
metadata:
name: ${{ defaults.app_name }}
labels:
run.claw.cloud/app-deploy-manager: ${{ defaults.app_name }}
spec:
ports:
- port: 80
selector:
app: ${{ defaults.app_name }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ${{ defaults.app_name }}
labels:
run.claw.cloud/app-deploy-manager: ${{ defaults.app_name }}
run.claw.cloud/app-deploy-manager-domain: ${{ defaults.app_host }}
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-body-size: 32m
nginx.ingress.kubernetes.io/server-snippet: |
client_header_buffer_size 64k;
large_client_header_buffers 4 128k;
nginx.ingress.kubernetes.io/ssl-redirect: 'false'
nginx.ingress.kubernetes.io/backend-protocol: HTTP
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/client-body-buffer-size: 64k
nginx.ingress.kubernetes.io/proxy-buffer-size: 64k
nginx.ingress.kubernetes.io/configuration-snippet: |
if ($request_uri ~* \.(js|css|gif|jpe?g|png)) {
expires 30d;
add_header Cache-Control "public";
}
spec:
rules:
- host: ${{ defaults.app_host }}.${{ CLAWCLOUD_CLOUD_DOMAIN }}
http:
paths:
- pathType: Prefix
path: /()(.*)
backend:
service:
name: ${{ defaults.app_name }}
port:
number: 80
tls:
- hosts:
- ${{ defaults.app_host }}.${{ CLAWCLOUD_CLOUD_DOMAIN }}
secretName: ${{ CLAWCLOUD_CERT_SECRET_NAME }}