Skip to content

Commit

Permalink
ci: Add relabelings to kubelet serviceMonitor (aws#4336)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored Jul 25, 2023
1 parent 0b8f5b1 commit bfc51a3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/actions/e2e/install-prometheus/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,12 @@ runs:
--set prometheus.prometheusSpec.remoteWrite[0].url=https://aps-workspaces.${{ inputs.region }}.amazonaws.com/workspaces/${{ inputs.workspace_id }}/api/v1/remote_write \
--set prometheus.prometheusSpec.remoteWrite[0].sigv4.region=${{ inputs.region }} \
--set prometheus.serviceAccount.annotations."eks\.amazonaws\.com/role-arn"="arn:aws:iam::${{ inputs.account_id }}:role/prometheus-irsa-${{ inputs.cluster_name }}" \
--wait
--set "kubelet.serviceMonitor.relabelings[0].targetLabel=clusterName" \
--set "kubelet.serviceMonitor.relabelings[0].replacement=${{ inputs.cluster_name }}" \
--set "kubelet.serviceMonitor.relabelings[1].targetLabel=gitRef" \
--set "kubelet.serviceMonitor.relabelings[1].replacement=$(git rev-parse HEAD)" \
--set "kubelet.serviceMonitor.relabelings[2].targetLabel=mostRecentTag" \
--set "kubelet.serviceMonitor.relabelings[2].replacement=$(git describe --abbrev=0 --tags)" \
--set "kubelet.serviceMonitor.relabelings[3].targetLabel=commitsAfterTag" \
--set "kubelet.serviceMonitor.relabelings[3].replacement=\"$(git describe --tags | cut -d '-' -f 2)\"" \
--wait

0 comments on commit bfc51a3

Please sign in to comment.