Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions terraform/dotnet/k8s/deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ resource "null_resource" "deploy" {
sleep 10
kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch
elif [ "${var.repository}" = "amazon-cloudwatch-agent" ]; then
# tempory fix for missing permissions that will be added by next release of cloudwatch agent operator
kubectl patch clusterrole cloudwatch-agent-role --type=json \
-p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups": ["discovery.k8s.io"], "resources": ["endpointslices"], "verbs": ["list", "watch", "get"]}}]'
kubectl patch amazoncloudwatchagents -n amazon-cloudwatch cloudwatch-agent --type='json' -p='[{"op": "replace", "path": "/spec/image", "value": ${var.patch_image_arn}}]'
kubectl delete pods --all -n amazon-cloudwatch
sleep 10
Expand Down
3 changes: 3 additions & 0 deletions terraform/java/k8s/deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ resource "null_resource" "deploy" {
sleep 10
kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch
elif [ "${var.repository}" = "amazon-cloudwatch-agent" ]; then
# tempory fix for missing permissions that will be added by next release of cloudwatch agent operator
kubectl patch clusterrole cloudwatch-agent-role --type=json \
-p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups": ["discovery.k8s.io"], "resources": ["endpointslices"], "verbs": ["list", "watch", "get"]}}]'
kubectl patch amazoncloudwatchagents -n amazon-cloudwatch cloudwatch-agent --type='json' -p='[{"op": "replace", "path": "/spec/image", "value": ${var.patch_image_arn}}]'
kubectl delete pods --all -n amazon-cloudwatch
sleep 10
Expand Down
3 changes: 3 additions & 0 deletions terraform/node/k8s/deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ resource "null_resource" "deploy" {
sleep 10
kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch
elif [ "${var.repository}" = "amazon-cloudwatch-agent" ]; then
# tempory fix for missing permissions that will be added by next release of cloudwatch agent operator
kubectl patch clusterrole cloudwatch-agent-role --type=json \
-p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups": ["discovery.k8s.io"], "resources": ["endpointslices"], "verbs": ["list", "watch", "get"]}}]'
kubectl patch amazoncloudwatchagents -n amazon-cloudwatch cloudwatch-agent --type='json' -p='[{"op": "replace", "path": "/spec/image", "value": ${var.patch_image_arn}}]'
kubectl delete pods --all -n amazon-cloudwatch
sleep 10
Expand Down
3 changes: 3 additions & 0 deletions terraform/python/k8s/deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ resource "null_resource" "deploy" {
sleep 10
kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch
elif [ "${var.repository}" = "amazon-cloudwatch-agent" ]; then
# tempory fix for missing permissions that will be added by next release of cloudwatch agent operator
kubectl patch clusterrole cloudwatch-agent-role --type=json \
-p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups": ["discovery.k8s.io"], "resources": ["endpointslices"], "verbs": ["list", "watch", "get"]}}]'
kubectl patch amazoncloudwatchagents -n amazon-cloudwatch cloudwatch-agent --type='json' -p='[{"op": "replace", "path": "/spec/image", "value": ${var.patch_image_arn}}]'
kubectl delete pods --all -n amazon-cloudwatch
sleep 10
Expand Down