Skip to content

Commit cf39cb1

Browse files
authored
Fixes Readme, adds dataplane spec to charts (#46)
* fix Readme and adds dataplane to helm charts
1 parent c088356 commit cf39cb1

File tree

4 files changed

+99
-4
lines changed

4 files changed

+99
-4
lines changed

operator/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ KIT uses the [operator pattern](https://kubernetes.io/docs/concepts/extend-kuber
4141
--name kit-controller \
4242
--namespace kit \
4343
--cluster ${SUBSTRATE_CLUSTER_NAME} \
44-
--attach-policy-arn arn:aws:iam::${AWS_ACCOUNT_ID}:policy/KitControllerPolicy \
44+
--attach-policy-arn arn:aws:iam::${AWS_ACCOUNT_ID}:policy/KitControllerPolicy-${SUBSTRATE_CLUSTER_NAME}-cluster \
4545
--approve \
4646
--override-existing-serviceaccounts \
4747
--region=${AWS_REGION}
@@ -50,7 +50,8 @@ KIT uses the [operator pattern](https://kubernetes.io/docs/concepts/extend-kuber
5050
#### Install KIT operator to the cluster
5151

5252
```bash
53-
helm upgrade --install kit-operator -n kit charts/kit-operator
53+
helm repo add kit https://awslabs.github.io/kubernetes-iteration-toolkit/
54+
helm upgrade --install kit-operator kit/kit-operator --namespace kit --create-namespace --version 0.0.1
5455
```
5556

5657
Once KIT operator is deployed in a Kubernetes cluster. You can create a new Kubernetes control plane and worker nodes by following these steps in any namespace in the substrate cluster
@@ -105,6 +106,6 @@ Once KIT operator is deployed in a Kubernetes cluster. You can create a new Kube
105106
```bash
106107
eksctl delete iamserviceaccount --name kit-controller \
107108
--namespace kit \
108-
--cluster ${CLUSTER_NAME} \
109+
--cluster ${SUBSTRATE_CLUSTER_NAME} \
109110
--region=$AWS_REGION
110111
```

operator/charts/kit-operator/templates/controller/rbac.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ rules:
8080
resources:
8181
- statefulsets
8282
- deployments
83+
- daemonsets
8384
verbs:
8485
- get
8586
- create
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.4.1
8+
creationTimestamp: null
9+
name: dataplanes.kit.k8s.sh
10+
spec:
11+
group: kit.k8s.sh
12+
names:
13+
kind: DataPlane
14+
listKind: DataPlaneList
15+
plural: dataplanes
16+
singular: dataplane
17+
scope: Namespaced
18+
versions:
19+
- name: v1alpha1
20+
schema:
21+
openAPIV3Schema:
22+
description: DataPlane is the Schema for the DataPlanes API
23+
properties:
24+
apiVersion:
25+
description: 'APIVersion defines the versioned schema of this representation
26+
of an object. Servers should convert recognized schemas to the latest
27+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
28+
type: string
29+
kind:
30+
description: 'Kind is a string value representing the REST resource this
31+
object represents. Servers may infer this from the endpoint the client
32+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
33+
type: string
34+
metadata:
35+
type: object
36+
spec:
37+
properties:
38+
clusterName:
39+
type: string
40+
nodeCount:
41+
type: integer
42+
type: object
43+
status:
44+
properties:
45+
conditions:
46+
description: Conditions is the set of conditions required for this
47+
DataPlane to create its objects, and indicates whether or not those
48+
conditions are met.
49+
items:
50+
description: 'Condition defines a readiness condition for a Knative
51+
resource. See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties'
52+
properties:
53+
lastTransitionTime:
54+
description: LastTransitionTime is the last time the condition
55+
transitioned from one status to another. We use VolatileTime
56+
in place of metav1.Time to exclude this from creating equality.Semantic
57+
differences (all other things held constant).
58+
format: date-time
59+
type: string
60+
message:
61+
description: A human readable message indicating details about
62+
the transition.
63+
type: string
64+
reason:
65+
description: The reason for the condition's last transition.
66+
type: string
67+
severity:
68+
description: Severity with which to treat failures of this type
69+
of condition. When this is not specified, it defaults to Error.
70+
type: string
71+
status:
72+
description: Status of the condition, one of True, False, Unknown.
73+
type: string
74+
type:
75+
description: Type of condition.
76+
type: string
77+
required:
78+
- status
79+
- type
80+
type: object
81+
type: array
82+
type: object
83+
type: object
84+
served: true
85+
storage: true
86+
subresources:
87+
status: {}
88+
status:
89+
acceptedNames:
90+
kind: ""
91+
plural: ""
92+
conditions: []
93+
storedVersions: []

operator/docs/kit.cloudformation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Resources:
3434
KitControllerPolicy:
3535
Type: "AWS::IAM::ManagedPolicy"
3636
Properties:
37-
ManagedPolicyName: "KitControllerPolicy"
37+
ManagedPolicyName: !Sub "KitControllerPolicy-${ClusterName}-cluster"
3838
PolicyDocument:
3939
Version: "2012-10-17"
4040
Statement:

0 commit comments

Comments
 (0)