-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: application set handler #241
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
fadc045
application set handler
Greyeye 6bf6b35
Merge branch 'main' into appset-support
Greyeye 18cbf67
ci fix
Greyeye 22361ab
role based access control chart
Greyeye 6fd63b2
suggestion fix
Greyeye c532174
fix echo-server appset
Greyeye 8ccec80
unit test for appset and vcstoargomap
Greyeye 9304b0b
changes for the reviews
Greyeye aed9764
read me for generator code
Greyeye e0b78d1
updated doc
Greyeye c6c46ca
unit test for GenerateListOfAffectedApps
Greyeye 8e7aac2
changes
Greyeye cf73588
Merge branch 'main' into appset-support
Greyeye 6813cdd
helm chart unit test update
Greyeye 30cbdb6
helm chart variable name change
Greyeye 70fac5a
change error output
Greyeye File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v2 | ||
name: kubechecks-rbac | ||
description: A Helm chart for kubechecks Role and RoleBinding | ||
version: 0.4.5 | ||
type: application | ||
maintainers: | ||
- name: zapier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# kubechecks-rbac | ||
|
||
This chart deploys the Cluster Role and Cluster Role binding for the kubechecks running outside of existing cluster. | ||
|
||
It is not required if you're operating all within the same cluster. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ .Values.clusterRoleName | default "kubechecks-remote-clusterrole" }} | ||
rules: | ||
- apiGroups: ['argoproj.io'] | ||
resources: ['applications', 'appprojects', 'applicationsets', 'services'] | ||
verbs: ['get', 'list', 'watch'] | ||
- apiGroups: [''] # The core API group, which is indicated by an empty string | ||
resources: ['secrets'] | ||
verbs: ['get', 'list', 'watch'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ .Values.clusterRoleBindingName | default "kubechecks-remote-role-binding" }} | ||
namespace: {{ .Values.namespace | default "argocd" }} | ||
subjects: | ||
- kind: Group | ||
apiGroup: rbac.authorization.k8s.io | ||
name: {{ .Values.clusterRoleBindingGroup | default "kubechecks-remote-group" }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ .Values.clusterRoleName | default "kubechecks-remote-role" }} | ||
apiGroup: rbac.authorization.k8s.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
suite: role tests | ||
|
||
templates: | ||
- role.yaml | ||
|
||
tests: | ||
- it: should create a Role with the correct name | ||
set: | ||
clusterRoleName: "kubechecks-test-role" | ||
asserts: | ||
- isKind: | ||
of: ClusterRole | ||
- equal: | ||
path: metadata.name | ||
value: kubechecks-test-role |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
suite: role binding tests | ||
|
||
templates: | ||
- rolebinding.yaml | ||
|
||
tests: | ||
- it: should create a RoleBinding with the correct name with EKS IAM role | ||
set: | ||
clusterRoleBindingName: "kubechecks-test-rolebinding-rbac" | ||
clusterRoleBindingGroup: "kubechecks-remote-group" | ||
asserts: | ||
- isKind: | ||
of: ClusterRoleBinding | ||
- equal: | ||
path: metadata.name | ||
value: kubechecks-test-rolebinding-rbac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Kubechecks Values Schema", | ||
"type": "object", | ||
"properties": { | ||
"clusterRoleName": { | ||
"type": "string", | ||
"description": "The name of the Cluster Role to be created.", | ||
"default": "kubechecks-remote-role" | ||
}, | ||
"clusterRoleBindingName": { | ||
"type": "string", | ||
"description": "The name of the ClusterRoleBinding to be created.", | ||
"default": "kubechecks-remote-role-binding" | ||
}, | ||
"clusterRoleBindingGroup": { | ||
"type": "string", | ||
"description": "The name of the Group to be created.", | ||
"default": "kubechecks-remote-group" | ||
}, | ||
"namespace": { | ||
"type": "string", | ||
"description": "The namespace where the Role and RoleBinding will be created.", | ||
"default": "argocd" | ||
} | ||
}, | ||
"required": ["clusterRoleName", "clusterRoleBindingName", "clusterRoleBindingGroup", "namespace"], | ||
"additionalProperties": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
clusterRoleName: "kubechecks-remote-role" | ||
clusterRoleBindingName: "kubechecks-remote-role-binding" | ||
clusterRoleBindingGroup: "kubechecks-remote-group" | ||
|
||
# namespace to create the ClusterRole and RoleBinding, this has to match the argocd is operating. | ||
namespace: "argocd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: v2 | ||
name: kubechecks | ||
description: A Helm chart for kubechecks | ||
version: 0.4.4 | ||
version: 0.4.5 | ||
type: application | ||
maintainers: | ||
- name: zapier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to do this? Feels like it'll introduce a lot of complexities with managing cluster authentication 🤔. Should kubechecks watch resources in other clusters?
IMHO, kubechecks should be deployed to clusters where argocd is deployed so that it can monitor argocd. That means multiple argocd instances, multiple kubechecks
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative is pretty gnarly. IAM roles, cross account trusts, etc, assuming it can actually be done. This seems relatively simple (compared to the rest of the features), and fairly isolated/repeatable.