Skip to content

Commit

Permalink
Use --helm-set to configure AKS BYOCNI installation
Browse files Browse the repository at this point in the history
We will not add these Azure specific flags for Helm installation mode.
Update the CI scripts to use the --helm-set flag instead.

Ref: #1566

Signed-off-by: Michi Mutsuzaki <[email protected]>
  • Loading branch information
michi-covalent committed May 5, 2023
1 parent a1ad5a3 commit ba7312d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 27 deletions.
3 changes: 1 addition & 2 deletions .github/in-cluster-test-scripts/aks-byocni-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ set -e
# Install Cilium
cilium install \
--version "${CILIUM_VERSION}" \
--disable-check=az-binary \
--datapath-mode=aks-byocni \
--wait=false \
--helm-set loadBalancer.l7.backend=envoy \
--helm-set tls.secretsBackend=k8s \
--config monitor-aggregation=none
--helm-set bpf.monitorAggregation=none
13 changes: 9 additions & 4 deletions .github/workflows/aks-byocni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
# will disappear from the PR checks: please provide a direct link to the
# successful workflow run (can be found from Actions tab) in a comment.
#
# pull_request: {}
pull_request: {}
###
pull_request_target: {}
# Run every 6 hours
Expand All @@ -36,7 +36,7 @@ concurrency:
cancel-in-progress: true

env:
name: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}
name: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}-${{ matrix.mode }}
location: westeurope
cost_reduction: --node-vm-size Standard_B2s --node-osdisk-size 30
cilium_version: v1.13.2
Expand All @@ -47,6 +47,9 @@ jobs:
if: ${{ github.repository == 'cilium/cilium-cli' }}
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
matrix:
mode: ["classic", "helm"]
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
Expand Down Expand Up @@ -130,7 +133,8 @@ jobs:
--set job_name=cilium-cli-install \
--set test_script_cm=cilium-cli-test-script-install \
--set tag=${{ steps.vars.outputs.sha }} \
--set cilium_version=${{ env.cilium_version }}
--set cilium_version=${{ env.cilium_version }} \
--set cilium_cli_mode=${{ matrix.mode }}
- name: Wait for install job
env:
Expand Down Expand Up @@ -163,7 +167,8 @@ jobs:
--generate-name \
--set job_name=cilium-cli \
--set test_script_cm=cilium-cli-test-script \
--set tag=${{ steps.vars.outputs.sha }}
--set tag=${{ steps.vars.outputs.sha }} \
--set cilium_cli_mode=${{ matrix.mode }}
- name: Wait for test job
env:
Expand Down
6 changes: 2 additions & 4 deletions install/autodetect.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package install
import (
"context"
"fmt"
"os"
"regexp"
"strconv"
"strings"
Expand All @@ -28,9 +29,6 @@ var (
k8s.KindKind: {
&kindVersionValidation{},
},
k8s.KindAKS: {
&azureVersionValidation{},
},
}

clusterNameValidation = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])$`)
Expand Down Expand Up @@ -112,7 +110,7 @@ func (k *K8sInstaller) autodetect(ctx context.Context) {
func (k *K8sInstaller) autodetectAndValidate(ctx context.Context) error {
k.autodetect(ctx)

if len(validationChecks[k.flavor.Kind]) > 0 {
if len(validationChecks[k.flavor.Kind]) > 0 && os.Getenv("CILIUM_CLI_MODE") != "helm" {
k.Log("✨ Running %q validation checks", k.flavor.Kind)
for _, check := range validationChecks[k.flavor.Kind] {
name := check.Name()
Expand Down
17 changes: 0 additions & 17 deletions install/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,6 @@ import (
"github.com/cilium/cilium-cli/internal/utils"
)

type azureVersionValidation struct{}

func (m *azureVersionValidation) Name() string {
return "az-binary"
}

func (m *azureVersionValidation) Check(_ context.Context, k *K8sInstaller) error {
_, err := k.azExec("version")
if err != nil {
return err
}

k.Log("✅ Detected az binary")

return nil
}

type accountInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Expand Down

0 comments on commit ba7312d

Please sign in to comment.