diff --git a/dist/resources/operator.yaml b/dist/resources/operator.yaml index e517aa0c..0b39b092 100644 --- a/dist/resources/operator.yaml +++ b/dist/resources/operator.yaml @@ -16,7 +16,7 @@ spec: serviceAccountName: kctf-operator containers: - name: kctf-operator - image: gcr.io/kctf-docker/kctf-operator@sha256:fc7fde30c7922e9229d8bb5b694d885ab49f545883f94dc875ca603f55a66ad2 + image: gcr.io/kctf-docker/kctf-operator@sha256:d049545f2a0a23e37eede433800161831b7ec61c3cc8309ed4b4ec24124df47d command: - kctf-operator imagePullPolicy: Always diff --git a/kctf-operator/pkg/controller/challenge/deployment/deployment.go b/kctf-operator/pkg/controller/challenge/deployment/deployment.go index fd9dccb5..2e3ca0ed 100644 --- a/kctf-operator/pkg/controller/challenge/deployment/deployment.go +++ b/kctf-operator/pkg/controller/challenge/deployment/deployment.go @@ -5,7 +5,6 @@ import ( utils "github.com/google/kctf/pkg/controller/challenge/utils" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - resource "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -70,19 +69,10 @@ func deployment(challenge *kctfv1.Challenge) *appsv1.Deployment { if deployment.Spec.Template.Spec.Containers[idx_challenge].SecurityContext.Capabilities == nil { deployment.Spec.Template.Spec.Containers[idx_challenge].SecurityContext.Capabilities = &corev1.Capabilities{}; } - + deployment.Spec.Template.Spec.Containers[idx_challenge].SecurityContext.Capabilities.Add = append(deployment.Spec.Template.Spec.Containers[idx_challenge].SecurityContext.Capabilities.Add, "SYS_ADMIN") - deployment.Spec.Template.Spec.Containers[idx_challenge].Resources = corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - "cpu": *resource.NewMilliQuantity(900, resource.DecimalSI), - }, - Requests: corev1.ResourceList{ - "cpu": *resource.NewMilliQuantity(450, resource.DecimalSI), - }, - } - volumeMounts := []corev1.VolumeMount{ { Name: "pow",