This commit is contained in:
samsep101
2026-01-05 14:24:13 +05:00
commit 92a1846189
5 changed files with 69 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*.swp
.DS_Store
.idea/

1
README.md Normal file
View File

@@ -0,0 +1 @@
# Team Infrastructure

View 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
View 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!"

View 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