Skip to content

Commit cbee5c1

Browse files
committed
Fix rebased errors
Signed-off-by: Drumil Patel <[email protected]>
1 parent fd08a2e commit cbee5c1

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

infra/infra.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func main() {
8686
// EKS based commands
8787
e := eks.New(dr)
8888
k8sEKS := app.Command("eks", "Amazon Elastic Kubernetes Service - https://aws.amazon.com/eks").
89-
Action(e.NewEKSClient)
89+
Action(e.SetupDeploymentResources)
9090
k8sEKS.Flag("auth", "filename which consist eks credentials.").
9191
PlaceHolder("credentials").
9292
Short('a').
@@ -97,6 +97,7 @@ func main() {
9797

9898
// EKS Cluster operations
9999
k8sEKSCluster := k8sEKS.Command("cluster", "manage EKS clusters").
100+
Action(e.NewEKSClient).
100101
Action(e.EKSDeploymentParse)
101102
k8sEKSCluster.Command("create", "eks cluster create -a credentials -f FileOrFolder").
102103
Action(e.ClusterCreate)
@@ -117,7 +118,8 @@ func main() {
117118
Action(e.AllNodeGroupsDeleted)
118119

119120
// K8s resource operations.
120-
k8sEKSResource := k8sEKS.Command("resource", `Apply and delete different k8s resources - deployments, services, config maps etc.Required variables -v REGION:europe-west1-b -v CLUSTER_NAME:test `).
121+
k8sEKSResource := k8sEKS.Command("resource", `Apply and delete different k8s resources - deployments, services, config maps etc.Required variables -v ZONE:us-east-2 -v CLUSTER_NAME:test `).
122+
Action(e.NewEKSClient).
121123
Action(e.NewK8sProvider).
122124
Action(e.K8SDeploymentsParse)
123125
k8sEKSResource.Command("apply", "eks resource apply -a credentials -f manifestsFileOrFolder -v hashStable:COMMIT1 -v hashTesting:COMMIT2").

pkg/provider/eks/eks.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func (c *EKS) K8SDeploymentsParse(*kingpin.ParseContext) error {
171171
log.Fatalf("Couldn't parse deployment files: %v", err)
172172
}
173173

174-
for _, deployment := range deploymentResource {
174+
for name, deployment := range deploymentResource {
175175

176176
decode := scheme.Codecs.UniversalDeserializer().Decode
177177
k8sObjects := make([]runtime.Object, 0)
@@ -183,6 +183,9 @@ func (c *EKS) K8SDeploymentsParse(*kingpin.ParseContext) error {
183183
}
184184

185185
resource, _, err := decode([]byte(text), nil, nil)
186+
// DEBUG
187+
fmt.Print(name)
188+
186189
if err != nil {
187190
return errors.Wrapf(err, "decoding the resource file:%v, section:%v...", deployment.FileName, text[:100])
188191
}

prombench/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ resource_apply:
2828
resource_delete:
2929
$(INFRA_CMD) ${PROVIDER} resource delete -a ${AUTH_FILE} \
3030
-v ZONE:${ZONE} -v GKE_PROJECT_ID:${GKE_PROJECT_ID} \
31-
-v REGION:${REGION} \
3231
-v CLUSTER_NAME:${CLUSTER_NAME} -v PR_NUMBER:${PR_NUMBER} \
3332
-f manifests/prombench/benchmark/1c_cluster-role-binding.yaml \
3433
-f manifests/prombench/benchmark/1a_namespace.yaml

prombench/docs/eks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export GITHUB_REPO=prometheus
6464
- Deploy the [nginx-ingress-controller](https://github.com/kubernetes/ingress-nginx), Prometheus-Meta, Loki, Grafana, Alertmanager & Github Notifier.
6565

6666
```
67-
../infra/infra eks resource apply -a $AUTH_FILE -v REGION:$REGION \
67+
../infra/infra eks resource apply -a $AUTH_FILE -v ZONE:$ZONE \
6868
-v CLUSTER_NAME:$CLUSTER_NAME -v DOMAIN_NAME:$DOMAIN_NAME \
6969
-v GRAFANA_ADMIN_PASSWORD:$GRAFANA_ADMIN_PASSWORD \
7070
-v OAUTH_TOKEN="$(printf $OAUTH_TOKEN | base64 -w 0)" \
@@ -98,15 +98,15 @@ export PR_NUMBER=<PR to benchmark against the selected $RELEASE>
9898

9999
```
100100
../infra/infra eks nodegroups create -a $AUTH_FILE \
101-
-v REGION:$REGION -v NODE_ROLE:$NODE_ROLE -v ROLE_ARN:$ROLE_ARN -v SUBNET_IDS:$SUBNET_IDS -v SEPARATOR:$SEPARATOR -v CLUSTER_NAME:$CLUSTER_NAME \
101+
-v ZONE:$ZONE -v NODE_ROLE:$NODE_ROLE -v ROLE_ARN:$ROLE_ARN -v SUBNET_IDS:$SUBNET_IDS -v SEPARATOR:$SEPARATOR -v CLUSTER_NAME:$CLUSTER_NAME \
102102
-v PR_NUMBER:$PR_NUMBER -f manifests/prombench/nodepools_eks.yaml
103103
```
104104

105105
- Deploy the k8s objects
106106

107107
```
108108
../infra/infra eks resource apply -a $AUTH_FILE \
109-
-v REGION:$REGION -v CLUSTER_NAME:$CLUSTER_NAME \
109+
-v ZONE:$ZONE -v CLUSTER_NAME:$CLUSTER_NAME \
110110
-v PR_NUMBER:$PR_NUMBER -v RELEASE:$RELEASE -v DOMAIN_NAME:$DOMAIN_NAME \
111111
-v GITHUB_ORG:${GITHUB_ORG} -v GITHUB_REPO:${GITHUB_REPO} \
112112
-f manifests/prombench/benchmark

prombench/manifests/cluster_eks.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
cluster:
22
name: {{ .CLUSTER_NAME }}
33
version: 1.14
4-
rolearn: {{ .ROLE_ARN }}
4+
rolearn: {{ .EKS_CLUSTER_ROLE_ARN }}
55
resourcesvpcconfig:
66
endpointpublicaccess: true
77
subnetids:
8-
{{ range $subnetId := split .SUBNET_IDS .SEPARATOR }}
8+
{{ range $subnetId := split .EKS_SUBNET_IDS .SEPARATOR }}
99
- {{ $subnetId }}
1010
{{ end }}
1111
nodegroups:
1212
- nodegroupname: main-node
13-
noderole: {{ .NODE_ROLE }}
13+
noderole: {{ .EKS_WORKER_ROLE_ARN }}
1414
disksize: 300
1515
subnets:
16-
{{ range $subnetId := split .SUBNET_IDS .SEPARATOR }}
16+
{{ range $subnetId := split .EKS_SUBNET_IDS .SEPARATOR }}
1717
- {{ $subnetId }}
1818
{{ end }}
1919
instancetypes:

prombench/manifests/prombench/nodes_eks.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ cluster:
22
name: {{ .CLUSTER_NAME }}
33
nodegroups:
44
- nodegroupname: prometheus-{{ .PR_NUMBER }}
5-
noderole: {{ .NODE_ROLE }}
5+
noderole: {{ .EKS_WORKER_ROLE_ARN }}
66
disksize: 100
77
subnets:
8-
{{ range $subnetId := split .SUBNET_IDS .SEPARATOR }}
8+
{{ range $subnetId := split .EKS_SUBNET_IDS .SEPARATOR }}
99
- {{ $subnetId }}
1010
{{ end }}
1111
instancetypes:
@@ -18,10 +18,10 @@ nodegroups:
1818
isolation: prometheus
1919
node-name: prometheus-{{ .PR_NUMBER }}
2020
- nodegroupname: nodes-{{ .PR_NUMBER }}
21-
noderole: {{ .NODE_ROLE }}
21+
noderole: {{ .EKS_WORKER_ROLE_ARN }}
2222
disksize: 100
2323
subnets:
24-
{{ range $subnetId := split .SUBNET_IDS .SEPARATOR }}
24+
{{ range $subnetId := split .EKS_SUBNET_IDS .SEPARATOR }}
2525
- {{ $subnetId }}
2626
{{ end }}
2727
instancetypes:

0 commit comments

Comments
 (0)