Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store last healthy into ApplicationHealth resource #746

Merged
merged 7 commits into from
Oct 2, 2022

Conversation

int128
Copy link
Owner

@int128 int128 commented Oct 1, 2022

Fix #745.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2022

diff

  • config/default/apiextensions.k8s.io_v1_customresourcedefinition_applicationhealths.argocdcommenter.int128.github.io.yaml (New)
  • config/default/rbac.authorization.k8s.io_v1_clusterrole_argocd-commenter-manager-role.yaml
  • e2e_test/controller/apiextensions.k8s.io_v1_customresourcedefinition_applicationhealths.argocdcommenter.int128.github.io.yaml (New)
  • e2e_test/controller/rbac.authorization.k8s.io_v1_clusterrole_argocd-commenter-manager-role.yaml

config/default/apiextensions.k8s.io_v1_customresourcedefinition_applicationhealths.argocdcommenter.int128.github.io.yaml

--- /dev/null
+++ b/tmp/kustomize-action-r1ncQB/config/default/apiextensions.k8s.io_v1_customresourcedefinition_applicationhealths.argocdcommenter.int128.github.io.yaml
@@ -0,0 +1,51 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  annotations:
+    controller-gen.kubebuilder.io/version: v0.9.2
+  creationTimestamp: null
+  name: applicationhealths.argocdcommenter.int128.github.io
+spec:
+  group: argocdcommenter.int128.github.io
+  names:
+    kind: ApplicationHealth
+    listKind: ApplicationHealthList
+    plural: applicationhealths
+    singular: applicationhealth
+  scope: Namespaced
+  versions:
+  - name: v1
+    schema:
+      openAPIV3Schema:
+        description: ApplicationHealth is the Schema for the applicationhealths API
+        properties:
+          apiVersion:
+            description: 'APIVersion defines the versioned schema of this representation
+              of an object. Servers should convert recognized schemas to the latest
+              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+            type: string
+          kind:
+            description: 'Kind is a string value representing the REST resource this
+              object represents. Servers may infer this from the endpoint the client
+              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+            type: string
+          metadata:
+            type: object
+          spec:
+            description: ApplicationHealthSpec defines the desired state of ApplicationHealth
+            type: object
+          status:
+            description: ApplicationHealthStatus defines the observed state of ApplicationHealth
+            properties:
+              lastHealthyDeploymentURL:
+                description: Last deployment URL when the application is healthy.
+                type: string
+              lastHealthyRevision:
+                description: Last revision when the application is healthy.
+                type: string
+            type: object
+        type: object
+    served: true
+    storage: true
+    subresources:
+      status: {}

config/default/rbac.authorization.k8s.io_v1_clusterrole_argocd-commenter-manager-role.yaml

--- a/tmp/kustomize-action-5Kd6qu/config/default/rbac.authorization.k8s.io_v1_clusterrole_argocd-commenter-manager-role.yaml
+++ b/tmp/kustomize-action-r1ncQB/config/default/rbac.authorization.k8s.io_v1_clusterrole_argocd-commenter-manager-role.yaml
@@ -4,6 +4,32 @@ metadata:
   creationTimestamp: null
   name: argocd-commenter-manager-role
 rules:
+- apiGroups:
+  - argocdcommenter.int128.github.io
+  resources:
+  - applicationhealths
+  verbs:
+  - create
+  - delete
+  - get
+  - list
+  - patch
+  - update
+  - watch
+- apiGroups:
+  - argocdcommenter.int128.github.io
+  resources:
+  - applicationhealths/finalizers
+  verbs:
+  - update
+- apiGroups:
+  - argocdcommenter.int128.github.io
+  resources:
+  - applicationhealths/status
+  verbs:
+  - get
+  - patch
+  - update
 - apiGroups:
   - argoproj.io
   resources:

e2e_test/controller/apiextensions.k8s.io_v1_customresourcedefinition_applicationhealths.argocdcommenter.int128.github.io.yaml

--- /dev/null
+++ b/tmp/kustomize-action-r1ncQB/e2e_test/controller/apiextensions.k8s.io_v1_customresourcedefinition_applicationhealths.argocdcommenter.int128.github.io.yaml
@@ -0,0 +1,51 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  annotations:
+    controller-gen.kubebuilder.io/version: v0.9.2
+  creationTimestamp: null
+  name: applicationhealths.argocdcommenter.int128.github.io
+spec:
+  group: argocdcommenter.int128.github.io
+  names:
+    kind: ApplicationHealth
+    listKind: ApplicationHealthList
+    plural: applicationhealths
+    singular: applicationhealth
+  scope: Namespaced
+  versions:
+  - name: v1
+    schema:
+      openAPIV3Schema:
+        description: ApplicationHealth is the Schema for the applicationhealths API
+        properties:
+          apiVersion:
+            description: 'APIVersion defines the versioned schema of this representation
+              of an object. Servers should convert recognized schemas to the latest
+              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+            type: string
+          kind:
+            description: 'Kind is a string value representing the REST resource this
+              object represents. Servers may infer this from the endpoint the client
+              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+            type: string
+          metadata:
+            type: object
+          spec:
+            description: ApplicationHealthSpec defines the desired state of ApplicationHealth
+            type: object
+          status:
+            description: ApplicationHealthStatus defines the observed state of ApplicationHealth
+            properties:
+              lastHealthyDeploymentURL:
+                description: Last deployment URL when the application is healthy.
+                type: string
+              lastHealthyRevision:
+                description: Last revision when the application is healthy.
+                type: string
+            type: object
+        type: object
+    served: true
+    storage: true
+    subresources:
+      status: {}

e2e_test/controller/rbac.authorization.k8s.io_v1_clusterrole_argocd-commenter-manager-role.yaml

--- a/tmp/kustomize-action-5Kd6qu/e2e_test/controller/rbac.authorization.k8s.io_v1_clusterrole_argocd-commenter-manager-role.yaml
+++ b/tmp/kustomize-action-r1ncQB/e2e_test/controller/rbac.authorization.k8s.io_v1_clusterrole_argocd-commenter-manager-role.yaml
@@ -4,6 +4,32 @@ metadata:
   creationTimestamp: null
   name: argocd-commenter-manager-role
 rules:
+- apiGroups:
+  - argocdcommenter.int128.github.io
+  resources:
+  - applicationhealths
+  verbs:
+  - create
+  - delete
+  - get
+  - list
+  - patch
+  - update
+  - watch
+- apiGroups:
+  - argocdcommenter.int128.github.io
+  resources:
+  - applicationhealths/finalizers
+  verbs:
+  - update
+- apiGroups:
+  - argocdcommenter.int128.github.io
+  resources:
+  - applicationhealths/status
+  verbs:
+  - get
+  - patch
+  - update
 - apiGroups:
   - argoproj.io
   resources:

@int128 int128 deleted the last-healthy-resource branch October 2, 2022 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Last healthy annotations are eventually removed in App of Apps
1 participant