Skip to content

Commit

Permalink
Merge branch 'main' into 2262
Browse files Browse the repository at this point in the history
  • Loading branch information
manno authored Jul 22, 2024
2 parents 57589c7 + 0ef20e4 commit 678cd49
Show file tree
Hide file tree
Showing 89 changed files with 1,595 additions and 1,509 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

-
name: Set up chart-testing
uses: helm/[email protected]
with:
version: v3.3.0
-
name: Run chart-testing (lint)
run: ct lint --all --validate-maintainers=false charts/
-
uses: actions/setup-go@v5
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI AKS
name: E2E on AKS

on:
schedule:
Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/e2e-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
name: E2E Fleet

on:
workflow_dispatch:
inputs:
enable_tmate:
description: 'Enable debugging via tmate'
required: false
default: "false"
pull_request:
push:
branches:
Expand All @@ -16,7 +10,7 @@ on:
env:
GOARCH: amd64
CGO_ENABLED: 0
SETUP_K3D_VERSION: 'v5.5.1'
SETUP_K3D_VERSION: 'v5.7.1'

jobs:
e2e-fleet-test:
Expand All @@ -27,7 +21,7 @@ jobs:
k3s_version:
# k3d version list k3s | sed 's/+/-/' | sort -h
# https://hub.docker.com/r/rancher/k3s/tags
- v1.29.0-k3s1
- v1.30.2-k3s2
- v1.24.17-k3s1
test_type:
- name: default
Expand Down Expand Up @@ -77,13 +71,6 @@ jobs:
name: Import Images Into k3d
run: |
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev nginx-git:test -c upstream
-
name: Set Up Tmate Debug Session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
with:
limit-access-to-actor: true
-
name: Deploy Fleet
env:
Expand Down Expand Up @@ -185,7 +172,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: gha-fleet-e2e-logs-${{ github.sha }}-${{ matrix.k3s_version }}-${{ github.run_id }}
name: gha-fleet-e2e-logs-${{ github.sha }}-${{ matrix.k3s_version }}-${{ matrix.test_type.name }}-${{ github.run_id }}
path: |
tmp/*.json
tmp/*.log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
# Upgrade Fleet standalone from latest released to dev version
name: Upgrade Fleet Standalone to HEAD
name: E2E Upgrade Fleet Standalone to HEAD

on:
schedule:
- cron: '0 8 */2 * *'
workflow_dispatch:
inputs:
enable_tmate:
description: 'Enable debugging via tmate'
required: false
default: "false"
pull_request:

env:
GOARCH: amd64
CGO_ENABLED: 0
SETUP_K3D_VERSION: 'v5.5.1'
SETUP_K3D_VERSION: 'v5.7.1'

jobs:
fleet-upgrade-test:
runs-on: ubuntu-latest
strategy:
matrix:
k3s_version:
- v1.27.5-k3s1
- v1.30.2-k3s2
steps:
-
uses: actions/checkout@v4
Expand All @@ -48,21 +42,14 @@ jobs:
--agents 1
--network "nw01"
--image docker.io/rancher/k3s:${{matrix.k3s_version}}
-
name: Set Up Tmate Debug Session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
with:
limit-access-to-actor: true
-
name: Deploy Latest Release
run: |
./.github/scripts/deploy-fleet-latest-release.sh
-
name: Create example workload
run: |
kubectl apply -n fleet-local -f e2e/assets/installation/bundle-diffs.yaml
kubectl apply -n fleet-local -f e2e/assets/installation/simple.yaml
-
name: Build Fleet Binaries
run: |
Expand All @@ -79,7 +66,7 @@ jobs:
name: Verify Example Workload
run: |
# we waited long enough by importing the image first
kubectl get configmap -n bundle-diffs-example | grep -q -m 1 "app-config"
kubectl get configmap -n simple-example | grep -q -m 1 "simple-config"
-
name: Upgrade to Dev Version
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI GKE
name: E2E on GKE

on:
schedule:
Expand Down
15 changes: 1 addition & 14 deletions .github/workflows/e2e-multicluster-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ on:
schedule:
# Run everyday day at 9:00 AM
- cron: '0 9 * * *'
workflow_dispatch:
inputs:
enable_tmate:
description: 'Enable debugging via tmate'
required: false
default: "false"
pull_request:
push:
branches:
Expand All @@ -18,7 +12,7 @@ on:
env:
GOARCH: amd64
CGO_ENABLED: 0
SETUP_K3D_VERSION: 'v5.5.1'
SETUP_K3D_VERSION: 'v5.7.1'

jobs:
e2e-fleet-mc-test:
Expand Down Expand Up @@ -87,13 +81,6 @@ jobs:
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev -c upstream
./.github/scripts/k3d-import-retry.sh rancher/fleet-agent:dev -c downstream
./.github/scripts/k3d-import-retry.sh rancher/fleet-agent:dev -c managed-downstream
-
name: Set Up Tmate Debug Session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
with:
limit-access-to-actor: true
-
name: Deploy Fleet
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# Nightly workflow tests more k8s versions than the e2e-ci workflow for PR does
name: Nightly E2E Fleet
name: E2E Nightly Fleet

on:
schedule:
# Run everyday day at 7:00 AM
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
enable_tmate:
description: 'Enable debugging via tmate'
required: false
default: "false"

env:
GOARCH: amd64
CGO_ENABLED: 0
SETUP_K3D_VERSION: 'v5.5.1'
SETUP_K3D_VERSION: 'v5.7.1'

jobs:
e2e-fleet-test:
Expand All @@ -25,8 +19,8 @@ jobs:
k3s_version:
# k3d version list k3s | sed 's/+/-/' | sort -h
# https://hub.docker.com/r/rancher/k3s/tags
- v1.30.2-k3s2
- v1.27.5-k3s1
- v1.26.8-k3s1
- v1.24.17-k3s1
test_type:
- acceptance
Expand Down Expand Up @@ -73,13 +67,6 @@ jobs:
name: Import Images Into k3d
run: |
./.github/scripts/k3d-import-retry.sh rancher/fleet:dev rancher/fleet-agent:dev nginx-git:test -c upstream
-
name: Set Up Tmate Debug Session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
with:
limit-access-to-actor: true
-
name: Deploy Fleet
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Upgrade fleet in latest Rancher to dev version and run MC tests
name: Upgrade Fleet in Rancher To HEAD
name: E2E Upgrade Fleet in Rancher To HEAD

on:
schedule:
Expand All @@ -11,10 +11,6 @@ on:
description: "checkout git branch/tag"
required: true
default: "main"
enable_tmate:
description: 'Enable debugging via tmate'
required: false
default: "false"
push:
tags: [ 'v*' ]
paths-ignore:
Expand All @@ -23,8 +19,8 @@ on:
env:
GOARCH: amd64
CGO_ENABLED: 0
SETUP_K3D_VERSION: 'v5.5.1'
SETUP_K3S_VERSION: 'v1.26.8-k3s1'
SETUP_K3D_VERSION: 'v5.7.1'
SETUP_K3S_VERSION: 'v1.30.2-k3s2'

jobs:
rancher-fleet-integration:
Expand Down Expand Up @@ -137,13 +133,6 @@ jobs:
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*'
--network "nw01"
--image docker.io/rancher/k3s:${{ env.SETUP_K3S_VERSION }}
-
name: Set up tmate debug session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
with:
limit-access-to-actor: true
-
name: Set up latest Rancher
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Upgrade Fleet in given Rancher versions to given Fleet release and run tests
name: Upgrade Fleet in Rancher
name: E2E Upgrade Fleet in Rancher

on:
workflow_dispatch:
Expand Down Expand Up @@ -38,7 +38,7 @@ on:
env:
GOARCH: amd64
CGO_ENABLED: 0
SETUP_K3D_VERSION: 'v5.5.1'
SETUP_K3D_VERSION: 'v5.7.1'

jobs:
rancher-fleet-upgrade:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-fleet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
args: release --clean --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}

- name: Upload charts to release
env:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ Fleet expects its Go code to be formatted with `goimports`.
Fleet further follows the style guidelines at

- [Effective Go](https://go.dev/doc/effective_go) and
- [Go Wiki Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
- [Go Wiki Code Review Comments](https://go.dev/wiki/CodeReviewComments)
- [Go Style At Google](https://google.github.io/styleguide/go/guide)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ Install the Fleet Helm charts (there's two because we separate out CRDs for ulti

```shell
helm -n cattle-fleet-system install --create-namespace --wait \
fleet-crd https://github.com/rancher/fleet/releases/download/v0.9.5/fleet-crd-0.9.5.tgz
fleet-crd https://github.com/rancher/fleet/releases/download/v0.10.0/fleet-crd-0.10.0.tgz
helm -n cattle-fleet-system install --create-namespace --wait \
fleet https://github.com/rancher/fleet/releases/download/v0.9.5/fleet-0.9.5.tgz
fleet https://github.com/rancher/fleet/releases/download/v0.10.0/fleet-0.10.0.tgz
```

## Add a Git Repo to watch
Expand Down
2 changes: 2 additions & 0 deletions charts/fleet-agent/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.helmignore
ci/
2 changes: 2 additions & 0 deletions charts/fleet-agent/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apiServerURL: "https://localhost"
apiServerCA: "abc"
6 changes: 6 additions & 0 deletions charts/fleet-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ spec:
drop:
- ALL
{{- end }}
volumeMounts:
- mountPath: /.kube
name: kube
- env:
- name: NAMESPACE
valueFrom:
Expand All @@ -82,6 +85,9 @@ spec:
drop:
- ALL
{{- end }}
volumes:
- name: kube
emptyDir: {}
serviceAccountName: fleet-agent
nodeSelector: {{ include "linux-node-selector" . | nindent 8 }}
{{- if .Values.fleetAgent.nodeSelector }}
Expand Down
4 changes: 2 additions & 2 deletions charts/fleet-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ agentTLSMode: "system-store"
token: ""

# Labels to add to the cluster upon registration only. They are not added after the fact.
#labels:
# foo: bar
# labels:
# foo: bar

# The client ID of the cluster to associate with
clientID: ""
Expand Down
Loading

0 comments on commit 678cd49

Please sign in to comment.