-
Notifications
You must be signed in to change notification settings - Fork 3
/
6.go
39 lines (31 loc) · 838 Bytes
/
6.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package challenges
import (
"context"
"time"
apiv1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
)
var challenge6 = Challenge{
Name: "A problem with the 🧠",
Description: "¯\\_(ツ)_/¯",
AllowedTime: 4 * time.Minute,
DeployFunc: func(ctx context.Context, clientSet *kubernetes.Clientset, r *rest.Config) error {
replicas := int32(2)
backEndDeployment.Spec.Replicas = &replicas
backEndDeployment.Spec.Template.Spec.Containers[0].Resources = apiv1.ResourceRequirements{
Limits: apiv1.ResourceList{
"memory": resource.MustParse("1Mi"),
},
}
return deployObjects(ctx, clientSet, true)
},
Readme: `
Welcome to "The Hive"
--------------------------------
`,
}
func init() {
Challenges = append(Challenges, challenge6)
}