-
Notifications
You must be signed in to change notification settings - Fork 22
186 lines (161 loc) · 6.01 KB
/
update-addons.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name: Update addons
on:
# Allow manual executions
workflow_dispatch:
# Run nightly
schedule:
- cron: '0 0 * * *'
jobs:
propose_update_pr:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- key: calico
path: cni.calico.chart
# Because of the way the Calico chart and CRDs are written, it is very
# difficult to infer the images (other than the operator image)
# Instead, we must list them here
# This string is formatted with the chart version
additional-images: |-
docker.io/calico/apiserver:{0}
docker.io/calico/cni:{0}
docker.io/calico/csi:{0}
docker.io/calico/kube-controllers:{0}
docker.io/calico/node-driver-registrar:{0}
docker.io/calico/node:{0}
docker.io/calico/pod2daemon-flexvol:{0}
docker.io/calico/typha:{0}
- key: cilium
path: cni.cilium.chart
- key: openstack-ccm
path: openstack.ccm.chart
- key: csi-cinder
path: openstack.csiCinder.chart
- key: k8s-keystone-auth
path: openstack.k8sKeystoneAuth.chart
values: |
openstackAuthUrl: https://keystone.my.openstack
projectId: notarealprojectid
- key: metrics-server
path: metricsServer.chart
- key: kubernetes-dashboard
path: kubernetesDashboard.chart
# v7 introduces substantial changes that break Azimuth integration
constraints: '<7.0.0'
values: |
metricsScraper:
enabled: true
- key: ingress-nginx
path: ingress.nginx.chart
- key: kube-prometheus-stack
path: monitoring.kubePrometheusStack.chart
- key: loki-stack
path: monitoring.lokiStack.chart
- key: prometheus-blackbox-exporter
path: monitoring.blackboxExporter.chart
- key: node-feature-discovery
path: nodeFeatureDiscovery.chart
- key: nvidia-gpu-operator
path: nvidiaGPUOperator.chart
values: |
nfd:
enabled: false
- key: mellanox-network-operator
path: mellanoxNetworkOperator.chart
values: |
nfd:
enabled: false
deployCR: true
ofedDriver:
deploy: true
rdmaSharedDevicePlugin:
deploy: true
ibKubernetes:
deploy: false
nvPeerDriver:
deploy: false
sriovNetworkOperator:
enabled: false
sriovDevicePlugin:
deploy: false
secondaryNetwork:
deploy: false
- key: node-problem-detector
path: nodeProblemDetector.chart
name: ${{ matrix.key }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Extract repo and chart from values.yaml
id: chart-info
uses: azimuth-cloud/github-actions/config-extract@master
with:
path: ./charts/cluster-addons/values.yaml
outputs: |
repo=${{ matrix.path }}.repo
name=${{ matrix.path }}.name
- name: Check for updates
id: next
uses: azimuth-cloud/github-actions/helm-latest-version@master
with:
repository: ${{ steps.chart-info.outputs.repo }}
chart: ${{ steps.chart-info.outputs.name }}
constraints: ${{ matrix.constraints || '>=0.0.0' }}
- name: Update chart version in values.yaml
uses: azimuth-cloud/github-actions/config-update@master
with:
path: ./charts/cluster-addons/values.yaml
updates: |
${{ matrix.path }}.version=${{ steps.next.outputs.version }}
- name: Template updated chart
id: helm-template
uses: azimuth-cloud/github-actions/helm-template@master
with:
repository: ${{ steps.chart-info.outputs.repo }}
chart: ${{ steps.chart-info.outputs.name }}
version: ${{ steps.next.outputs.version }}
values: ${{ matrix.values || '{}' }}
- name: Extract images from templated manifests
id: extract-images
uses: azimuth-cloud/github-actions/k8s-extract-images@master
with:
manifests-file: ${{ steps.helm-template.outputs.manifests-file }}
- name: Ensure manifests directory exists
run: mkdir -p ./skopeo-manifests
- name: Write Skopeo manifest
uses: azimuth-cloud/github-actions/skopeo-manifest@master
with:
manifest-file: ./skopeo-manifests/${{ matrix.key }}.yaml
images: |
${{ steps.extract-images.outputs.images }}
${{
format(
matrix.additional-images || '',
steps.next.outputs.version,
steps.next.outputs.app-version
)
}}
- name: Generate app token for PR
uses: azimuth-cloud/github-actions/generate-app-token@master
id: generate-app-token
with:
repository: ${{ github.repository }}
app-id: ${{ secrets.AUTOMATION_APP_ID }}
app-private-key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}
- name: Propose changes via PR if required
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-app-token.outputs.token }}
commit-message: >-
Update ${{ matrix.key }} addon to ${{ steps.next.outputs.version }}
branch: update-addon/${{ matrix.key }}
delete-branch: true
title: >-
Update ${{ matrix.key }} addon to ${{ steps.next.outputs.version }}
body: >
This PR was created automatically to update the
${{ matrix.key }} addon to ${{ steps.next.outputs.version }}.
labels: |
automation
addon-update