Skip to content

Commit

Permalink
fix: Improve deployment tracker functionality
Browse files Browse the repository at this point in the history
코어 기능 개선:
- 이미지 변경 감지 로직 개선
- 이미지 다이제스트 기반 비교 구현
- RBAC 권한 추가 (events 리소스)
- 중복 알림 발송 방지

Core functionality improvements:
- Enhanced image change detection
- Implemented image digest-based comparison
- Added RBAC permissions (events resource)
- Prevented duplicate notifications

Signed-off-by: ddukbg <[email protected]>
  • Loading branch information
ddukbg committed Oct 30, 2024
1 parent 6751b4e commit c7ce69c
Show file tree
Hide file tree
Showing 3 changed files with 277 additions and 145 deletions.
7 changes: 4 additions & 3 deletions api/v1alpha1/deployment_tracker_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (

// DeploymentTrackerSpec defines the desired state of DeploymentTracker
type DeploymentTrackerSpec struct {
DeploymentName string `json:"deploymentName,omitempty"`
Namespace string `json:"namespace,omitempty"`
Notify NotifyConfig `json:"notify"`
DeploymentName string `json:"deploymentName,omitempty"`
Namespace string `json:"namespace,omitempty"`
Notify NotifyConfig `json:"notify"`
NotifyOnScale bool `json:"notifyOnScale,omitempty"` // 스케일링 알림 옵션
}

// NotifyConfig defines notification details
Expand Down
7 changes: 4 additions & 3 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# config/rbac/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand All @@ -8,10 +9,10 @@ rules:
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "watch"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create"]
resources: ["events"] # events 리소스 추가
verbs: ["create", "patch"]
- apiGroups: ["ddukbg.k8s"]
resources: ["deploymenttrackers/status"]
verbs: ["get", "update", "patch"]
Loading

0 comments on commit c7ce69c

Please sign in to comment.