bun init
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*.swp
|
||||||
|
.DS_Store
|
||||||
|
.idea/
|
||||||
23
policies/auto-label-static.yaml
Normal file
23
policies/auto-label-static.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: kyverno.io/v1
|
||||||
|
kind: ClusterPolicy
|
||||||
|
metadata:
|
||||||
|
name: auto-label-static
|
||||||
|
annotations:
|
||||||
|
policies.kyverno.io/title: Auto-label static applications
|
||||||
|
policies.kyverno.io/category: Best Practices
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- name: add-security-labels
|
||||||
|
match:
|
||||||
|
resources:
|
||||||
|
kinds:
|
||||||
|
- Pod
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/part-of: "static-site"
|
||||||
|
mutate:
|
||||||
|
patchStrategicMerge:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
security.kyverno.io/nonsecure: "true"
|
||||||
|
app-type: "static"
|
||||||
16
update-image.sh
Executable file
16
update-image.sh
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Скрипт для обновления тега образа в KubeVela Application
|
||||||
|
IMAGE_TAG=$1
|
||||||
|
APP_FILE="vela-apps/1-simple/static-site.yaml"
|
||||||
|
|
||||||
|
if [ -z "$IMAGE_TAG" ]; then
|
||||||
|
echo "Usage: $0 <image-tag>"
|
||||||
|
echo "Example: $0 v1.2.3"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Обновляем тег образа
|
||||||
|
sed -i "s|image:.*drone/test:.*|image: harbor.apps.kopikopi.com.ru/drone/test:${IMAGE_TAG}|g" $APP_FILE
|
||||||
|
|
||||||
|
echo "Updated $APP_FILE with tag: $IMAGE_TAG"
|
||||||
|
echo "Don't forget to commit and push!"
|
||||||
26
vela-apps/1-simple/static-site.yaml
Normal file
26
vela-apps/1-simple/static-site.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: core.oam.dev/v1beta1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: static-site
|
||||||
|
namespace: default
|
||||||
|
annotations:
|
||||||
|
# Автоматическое обновление при изменении
|
||||||
|
argocd.argoproj.io/sync-wave: "0"
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
- name: frontend
|
||||||
|
type: webservice
|
||||||
|
properties:
|
||||||
|
image: harbor.apps.kopikopi.com.ru/drone/test:latest
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
expose: true
|
||||||
|
traits:
|
||||||
|
- type: ingress
|
||||||
|
properties:
|
||||||
|
domain: static.apps.kopikopi.com.ru
|
||||||
|
http:
|
||||||
|
"/": 80
|
||||||
|
tls:
|
||||||
|
enabled: true
|
||||||
|
secretName: static-tls
|
||||||
Reference in New Issue
Block a user