-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: application set handler (#241)
* application set handler 1. added appset watcher 2. change: cluster role (applicationset permisssion), ability to read/get/list secrets 3. change: updated the helm chart version 4. change: tiltfile for appset, Tile will no longer install appset yaml to the local k8s, instead, copies the template appsets yaml with replaced repo_url. Terraform will copy the file to the appropriate repo. 5. new: kubernetes client for EKS. 6. new: in EKS Client, STS authentication is automated with a custom http transport (to auto refresh token) 7. new: extended the cobra flag, and serverConfig to handle kubernetes-type (e.g. eks, local), kubernetes-clusterid, kubernetes-cluster-region 8. change: moved appwatcher's kubeclient init to container and instead pass the rest.Config as parameter to appwatcher. 9. new: forked generator code from argo-cd (excluding pull_request generator as it is not compatible with go-gitlab v0.105) * ci fix 1. lint fix 2. remove commented code from app_directory 3. app and appset watcher to check kubeCfg is not nil 4. add comments to the docs * role based access control chart 1. add new helm chart to help install role/rolebinding to grant access to the kubernetes cluster remotely. --------- Signed-off-by: James Hong <[email protected]>
- Loading branch information
Showing
73 changed files
with
5,703 additions
and
199 deletions.
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.