github.com/argoproj-labs/argocd-operator@v0.10.0/tests/k8s/1-026_validate_resource_action/01-assert.yaml (about) 1 apiVersion: kuttl.dev/v1beta1 2 kind: TestAssert 3 timeout: 120 4 --- 5 apiVersion: argoproj.io/v1alpha1 6 kind: ArgoCD 7 metadata: 8 name: example-argocd 9 status: 10 phase: Available 11 --- 12 apiVersion: v1 13 kind: ConfigMap 14 metadata: 15 name: argocd-cm 16 data: 17 resource.customizations.actions.apps_Deployment: | 18 discovery.lua: | 19 actions = {} 20 actions["restart"] = {} 21 return actions 22 definitions: 23 - name: restart 24 # Lua Script to modify the obj 25 action.lua: | 26 local os = require("os") 27 if obj.spec.template.metadata == nil then 28 obj.spec.template.metadata = {} 29 end 30 if obj.spec.template.metadata.annotations == nil then 31 obj.spec.template.metadata.annotations = {} 32 end 33 obj.spec.template.metadata.annotations["kubectl.kubernetes.io/restartedAt"] = os.date("!%Y-%m-%dT%XZ") 34 return obj