-
Notifications
You must be signed in to change notification settings - Fork 0
/
2-cluster-monitoring-infra-pipeline.yml
56 lines (52 loc) · 1.92 KB
/
2-cluster-monitoring-infra-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# create a unique name based on your project requirements
name: $(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
trigger: none
resources:
- repo: self
# global variables
variables:
vmImageName: 'ubuntu-latest'
azureSubscription: 'azure-conn'
kubernetesAzureResourceGroup: '_rg-aks-d-we-001'
kubernetesCluster: 'aks-d-we-001'
stages:
- stage: Release
displayName: Release stage
jobs:
- deployment: DeployToAKS
pool:
vmImage: $(vmImageName)
environment: prod
strategy:
runOnce:
deploy:
steps:
- checkout: self
- task: HelmInstaller@1
displayName: Helm installer
inputs:
helmVersionToInstall: latest
- task: Kubernetes@1
displayName: Create Kubernetes monitoring NS
inputs:
connectionType: 'Kubernetes Service Connection'
kubernetesServiceEndpoint: 'cluster-conn'
command: 'apply'
arguments: '-f manifests/monitoring-ns.yml'
- script: |
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo update
displayName: 'Update Helm repo charts'
- task: HelmDeploy@0
displayName: 'Helm install Prometheus'
inputs:
connectionType: 'Azure Resource Manager'
azureSubscription: $(azureSubscription)
azureResourceGroup: $(kubernetesAzureResourceGroup)
kubernetesCluster: $(kubernetesCluster)
namespace: 'monitoring'
command: 'upgrade'
chartType: 'Name'
chartName: 'stable/prometheus'
releaseName: 'prometheus'
valueFile: 'monitoring/prometheus/values.yaml'