Skip to content

Commit

Permalink
Stub out AKS cluster creation and a simple AKS test.
Browse files Browse the repository at this point in the history
Eventually, we should make the AKS test do something meaningful

Signed-off-by: Pete Wall <[email protected]>
  • Loading branch information
petewall committed Jan 9, 2025
1 parent 625ff0c commit ab3b909
Show file tree
Hide file tree
Showing 11 changed files with 881 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/platform-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ jobs:
- name: Check for cluster config
id: check-cluster-config
run: |
if [ -f "charts/k8s-monitoring/tests/platform/${{ matrix.test }}/eks-cluster-config.yaml" ]; then
if [ -f "charts/k8s-monitoring/tests/platform/${{ matrix.test }}/aks-cluster-config.yaml" ]; then
echo "cluster-type=aks" >> "${GITHUB_OUTPUT}"
elif [ -f "charts/k8s-monitoring/tests/platform/${{ matrix.test }}/eks-cluster-config.yaml" ]; then
echo "cluster-type=eks" >> "${GITHUB_OUTPUT}"
elif [ -f "charts/k8s-monitoring/tests/platform/${{ matrix.test }}/gke-cluster-config.yaml" ]; then
echo "cluster-type=gke" >> "${GITHUB_OUTPUT}"
Expand All @@ -88,6 +90,14 @@ jobs:
with:
install_only: true

- name: Setup Azure CLI
if: ${{ steps.check-cluster-config.outputs.cluster-type == 'aks' }}
run: ""

- name: Configure Azure Credentials
if: ${{ steps.check-cluster-config.outputs.cluster-type == 'aks' }}
run: ""

- name: Setup eksctl CLI
if: ${{ steps.check-cluster-config.outputs.cluster-type == 'eks' }}
run: |
Expand Down
8 changes: 8 additions & 0 deletions charts/k8s-monitoring/tests/platform/aks/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export AZURE_SUBSCRIPTION_ID=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/Azure/subscription id")
export AZURE_TENANT_ID=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/Azure/tenant id")
export AZURE_CLIENT_ID=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/Azure/client id")

export GRAFANA_CLOUD_METRICS_USERNAME=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Prometheus/username")
export GRAFANA_CLOUD_LOGS_USERNAME=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Loki/username")
export GRAFANA_CLOUD_RW_POLICY_TOKEN=$(op --account grafana.1password.com read "op://Kubernetes Monitoring/helmchart Loki/password")
export RANDOM_NUMBER=$(shuf -i 100000-999999 -n 1)
2 changes: 2 additions & 0 deletions charts/k8s-monitoring/tests/platform/aks/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deployments/grafana-cloud-credentials.yaml
deployments/test-variables.yaml
Loading

0 comments on commit ab3b909

Please sign in to comment.