Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Trojanekkk committed Nov 13, 2024
1 parent ea57edb commit 44b05d3
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 28 deletions.
2 changes: 1 addition & 1 deletion app/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def get_nodepools():

if (len(nodepools) == 0):
logging.warning("No NodePools found")
return 0
return []

nodepools_obj = [ NodePool(np['metadata']['name'], np['spec']['selectors'], np['spec']['taints']) for np in nodepools ]

Expand Down
27 changes: 0 additions & 27 deletions k8s/deployment.yaml

This file was deleted.

74 changes: 74 additions & 0 deletions k8s/operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nodepools-operator
spec:
selector:
matchLabels:
app: nodepools-operator
template:
metadata:
labels:
app: nodepools-operator
spec:
serviceAccountName: nodepools-operator-sa
containers:
- name: nodepools-operator
image: trojanekkk/nodepools-operator:latest
resources:
limits:
memory: "256Mi"
cpu: "200m"
requests:
memory: "32Mi"
cpu: "50m"
tolerations:
- key: "node-role.kubernetes.io/control-plane"
operator: Exists
effect: NoSchedule
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: nodepools-operator-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: nodepools-operator-cr
rules:
- apiGroups:
- ""
resources:
- nodes
- nodes/status
verbs:
- 'patch'
- 'watch'
- 'list'
- apiGroups:
- ""
resources:
- events
verbs:
- 'create'
- apiGroups:
- "cluster.trojanekkk.com"
resources:
- nodepools
verbs:
- 'list'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: nodepools-operator-crb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: nodepools-operator-cr
subjects:
- kind: ServiceAccount
name: nodepools-operator-sa
namespace: default

0 comments on commit 44b05d3

Please sign in to comment.