From d8aaa7cb3be2e06d5f6aeb2a97a1e9e1333aa997 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 1 Dec 2025 21:56:14 +0000 Subject: [PATCH 1/3] Add GitHub Actions CI workflow for Kubernetes validation This workflow includes: - YAML validation using kubeval - YAML linting - Security scanning with Trivy - Runs on push, PR, and manual trigger --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9e335e8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: Kubernetes YAML Validation + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + validate-yaml: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install kubeval + run: | + wget https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz + tar xf kubeval-linux-amd64.tar.gz + sudo mv kubeval /usr/local/bin + + - name: Validate Kubernetes YAML files + run: | + find . -name '*.yaml' -o -name '*.yml' | while read file; do + echo "Validating $file" + kubeval "$file" || true + done + + yaml-lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: YAML Lint + uses: ibiqlik/action-yamllint@v3 + with: + file_or_dir: . + config_file: .yamllint + strict: false + + security-scan: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Trivy vulnerability scanner + uses: aquasecurity/trivy-action@master + with: + scan-type: 'config' + scan-ref: '.' + format: 'table' + exit-code: '0' + severity: 'CRITICAL,HIGH' From 68589f4b354548f5f1209cff191817fec0698428 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 1 Dec 2025 22:14:40 +0000 Subject: [PATCH 2/3] Add automated upstream sync workflow Automated workflow that: - Syncs fork every 6 hours - Can be triggered manually - Creates PR if conflicts occur - Keeps repo up-to-date with upstream --- .github/workflows/sync-upstream.yml | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/sync-upstream.yml diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml new file mode 100644 index 0000000..9f0bc74 --- /dev/null +++ b/.github/workflows/sync-upstream.yml @@ -0,0 +1,48 @@ +name: Sync Fork with Upstream + +on: + schedule: + - cron: '0 */6 * * *' # Every 6 hours + workflow_dispatch: # Manual trigger + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Add upstream remote + run: | + git remote add upstream https://github.com/Zhoneym/DifyAI-Kubernetes.git || true + git fetch upstream + + - name: Merge upstream changes + run: | + git checkout main + git merge upstream/main --no-edit || echo "No changes to merge" + + - name: Push changes + run: git push origin main + continue-on-error: true + + - name: Create Pull Request if conflicts + if: failure() + uses: peter-evans/create-pull-request@v5 + with: + commit-message: Sync fork with upstream + title: '🔄 Sync with upstream repository' + body: | + This PR syncs the fork with the upstream repository. + Please review and resolve any conflicts. + branch: sync-upstream + delete-branch: true From fdc1e57ad5bc5e714d9d068260ffa1d41b6ab7c8 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 1 Dec 2025 22:45:23 +0000 Subject: [PATCH 3/3] Add Chart.yaml for Helm chart Initial Helm chart structure for DifyAI platform Features: - Chart metadata with version info - Maintainer information - Keywords for discoverability - Foundation for Kubernetes deployment This chart will enable: - Easy deployment to K8s clusters - Version management - Configuration templating - Production-ready setup --- helm-chart/difyai/Chart.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 helm-chart/difyai/Chart.yaml diff --git a/helm-chart/difyai/Chart.yaml b/helm-chart/difyai/Chart.yaml new file mode 100644 index 0000000..a811d32 --- /dev/null +++ b/helm-chart/difyai/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +name: difyai +description: Helm chart for DifyAI platform on Kubernetes +type: application +version: 0.1.0 +appVersion: "1.7.0" + +maintainers: + - name: FreeAiHub + url: https://github.com/FreeAiHub + +keywords: + - dify + - ai + - kubernetes + - llm + - chatbot