apiVersion: v1
kind: ConfigMap
metadata:
  namespace: blog-ni-system
  name: blog-ni-after-deploy-config
data:
  after-deploy.sh: |
    #!/bin/ash

    curl -L -X PATCH 'https://192.168.0.6:6443/apis/apps/v1/namespaces/blog-ni-system/statefulsets/blog-ni-app?fieldManager=kubectl-rollout&pretty=true' \
    -H 'Content-Type: application/strategic-merge-patch+json' \
    -H "Authorization: Bearer $HUGO_KUBECTL_TOKEN" \
    --insecure \
    -d "{
        \"spec\": {
            \"template\": {
                \"metadata\": {
                    \"annotations\": {
                        \"kubectl.kubernetes.io/restartedAt\": \"$(date)\"
                    }
                }
            }
        }
    }"