commit 92a1846189bc69b53cf939a893d107713c1a5736 Author: samsep101 Date: Mon Jan 5 14:24:13 2026 +0500 bun init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6152c45 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.swp +.DS_Store +.idea/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..4bd9cc4 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Team Infrastructure diff --git a/policies/auto-label-static.yaml b/policies/auto-label-static.yaml new file mode 100644 index 0000000..7acdf8b --- /dev/null +++ b/policies/auto-label-static.yaml @@ -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" diff --git a/update-image.sh b/update-image.sh new file mode 100755 index 0000000..31f7318 --- /dev/null +++ b/update-image.sh @@ -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 " + 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!" diff --git a/vela-apps/1-simple/static-site.yaml b/vela-apps/1-simple/static-site.yaml new file mode 100644 index 0000000..54ecc30 --- /dev/null +++ b/vela-apps/1-simple/static-site.yaml @@ -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