Skip to content

Commit bb538b1

Browse files
authored
Merge pull request openshift#388 from gkurz/revert-385
Revert "Merge pull request openshift#385 from openshift/1.6-bump"
2 parents 1082483 + f59926a commit bb538b1

35 files changed

+792
-3481
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ COPY main.go main.go
1515
COPY api api/
1616
COPY config config/
1717
COPY controllers controllers/
18-
COPY internal internal/
1918

2019
RUN go mod download
2120
# needed for docker build but not for local builds

PROJECT

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# Code generated by tool. DO NOT EDIT.
2-
# This file is used to track the info used to scaffold your project
3-
# and allow the plugins properly work.
4-
# More info: https://book.kubebuilder.io/reference/project-config.html
51
domain: kataconfiguration.openshift.io
62
layout:
73
- go.kubebuilder.io/v3
@@ -12,9 +8,9 @@ projectName: sandboxed-containers-operator
128
repo: github.com/openshift/sandboxed-containers-operator
139
resources:
1410
- group: confidentialcontainers
11+
version: v1alpha1
1512
kind: PeerPodConfig
1613
path: github.com/confidential-containers/cloud-api-adaptor/peerpodconfig-ctrl/api/v1alpha1
17-
version: v1alpha1
1814
- controller: true
1915
domain: kataconfiguration.openshift.io
2016
group: kataconfiguration
@@ -32,9 +28,4 @@ resources:
3228
kind: PeerPod
3329
path: github.com/confidential-containers/cloud-api-adaptor/peerpod-ctrl/api/v1alpha1
3430
version: v1alpha1
35-
- controller: true
36-
group: core
37-
kind: Secret
38-
path: k8s.io/api/core/v1
39-
version: v1
4031
version: "3"

api/v1/kataconfig_webhook.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ package v1
1919
import (
2020
"context"
2121
"fmt"
22-
2322
corev1 "k8s.io/api/core/v1"
2423
"k8s.io/apimachinery/pkg/runtime"
2524
ctrl "sigs.k8s.io/controller-runtime"
2625
"sigs.k8s.io/controller-runtime/pkg/client"
2726
logf "sigs.k8s.io/controller-runtime/pkg/log"
2827
"sigs.k8s.io/controller-runtime/pkg/webhook"
29-
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
3028
)
3129

3230
var (
@@ -51,36 +49,36 @@ func (r *KataConfig) SetupWebhookWithManager(mgr ctrl.Manager) error {
5149
var _ webhook.Validator = &KataConfig{}
5250

5351
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
54-
func (r *KataConfig) ValidateCreate() (admission.Warnings, error) {
52+
func (r *KataConfig) ValidateCreate() error {
5553
kataconfiglog.Info("validate create", "name", r.Name)
5654

5755
kataConfigList := &KataConfigList{}
5856
listOpts := []client.ListOption{
5957
client.InNamespace(corev1.NamespaceAll),
6058
}
6159
if err := clientInst.List(context.TODO(), kataConfigList, listOpts...); err != nil {
62-
return nil, fmt.Errorf("Failed to list KataConfig custom resources: %v", err)
60+
return fmt.Errorf("Failed to list KataConfig custom resources: %v", err)
6361
}
6462

6563
if len(kataConfigList.Items) == 1 {
66-
return nil, fmt.Errorf("A KataConfig instance already exists, refusing to create a duplicate")
64+
return fmt.Errorf("A KataConfig instance already exists, refusing to create a duplicate")
6765
}
6866

69-
return nil, nil
67+
return nil
7068
}
7169

7270
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
73-
func (r *KataConfig) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
71+
func (r *KataConfig) ValidateUpdate(old runtime.Object) error {
7472
kataconfiglog.Info("validate update", "name", r.Name)
7573

7674
// TODO(user): fill in your validation logic upon object update.
77-
return nil, nil
75+
return nil
7876
}
7977

8078
// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
81-
func (r *KataConfig) ValidateDelete() (admission.Warnings, error) {
79+
func (r *KataConfig) ValidateDelete() error {
8280
kataconfiglog.Info("validate delete", "name", r.Name)
8381

8482
// TODO(user): fill in your validation logic upon object deletion.
85-
return nil, nil
83+
return nil
8684
}

bundle-custom.Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ COPY go.sum go.sum
1010
COPY api api/
1111
COPY config config/
1212
COPY controllers controllers/
13-
COPY internal internal/
1413

1514
RUN go mod download
1615
# needed for docker build but not for local builds

config/manager/manager.yaml

Lines changed: 60 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -35,68 +35,66 @@ spec:
3535
seccompProfile:
3636
type: RuntimeDefault
3737
tolerations:
38-
- effect: NoSchedule
39-
key: node-role.kubernetes.io/master
40-
operator: Exists
41-
- effect: NoExecute
42-
key: node.kubernetes.io/unreachable
43-
operator: Exists
44-
tolerationSeconds: 120
45-
- effect: NoExecute
46-
key: node.kubernetes.io/not-ready
47-
operator: Exists
48-
tolerationSeconds: 120
49-
- effect: NoSchedule
50-
key: node.kubernetes.io/memory-pressure
51-
operator: Exists
38+
- effect: NoSchedule
39+
key: node-role.kubernetes.io/master
40+
operator: Exists
41+
- effect: NoExecute
42+
key: node.kubernetes.io/unreachable
43+
operator: Exists
44+
tolerationSeconds: 120
45+
- effect: NoExecute
46+
key: node.kubernetes.io/not-ready
47+
operator: Exists
48+
tolerationSeconds: 120
49+
- effect: NoSchedule
50+
key: node.kubernetes.io/memory-pressure
51+
operator: Exists
5252
volumes:
53-
- name: ssh
54-
secret:
55-
defaultMode: 384
56-
optional: true
57-
secretName: ssh-key-secret
53+
- name: ssh
54+
secret:
55+
defaultMode: 384
56+
optional: true
57+
secretName: ssh-key-secret
5858
containers:
59-
- command:
60-
- /manager
61-
args:
62-
- --enable-leader-election
63-
volumeMounts:
64-
- mountPath: /root/.ssh/
65-
name: ssh
66-
readOnly: true
67-
envFrom:
68-
- secretRef:
69-
name: peer-pods-secret
70-
optional: true
71-
- configMapRef:
72-
name: peer-pods-cm
73-
optional: true
74-
image: controller:latest
75-
name: manager
76-
env:
77-
- name: PEERPODS_NAMESPACE
78-
value: "openshift-sandboxed-containers-operator"
79-
- name: RELATED_IMAGE_KATA_MONITOR
80-
value: quay.io/openshift_sandboxed_containers/openshift-sandboxed-containers-monitor:latest
81-
- name: SANDBOXED_CONTAINERS_EXTENSION
82-
value: kata-containers
83-
- name: RELATED_IMAGE_CAA
84-
value: registry.redhat.io/openshift-sandboxed-containers/osc-cloud-api-adaptor-rhel9:latest
85-
- name: RELATED_IMAGE_PEERPODS_WEBHOOK
86-
value: "quay.io/confidential-containers/peer-pods-webhook:latest"
87-
- name: RELATED_IMAGE_PODVM_BUILDER
88-
value: "quay.io/openshift_sandboxed_containers/openshift-sandboxed-containers-podvm-builder:latest"
89-
imagePullPolicy: Always
90-
resources:
91-
limits:
92-
cpu: 200m
93-
memory: 256Mi
94-
requests:
95-
cpu: 100m
96-
memory: 40Mi
97-
securityContext:
98-
allowPrivilegeEscalation: false
99-
capabilities:
100-
drop:
101-
- ALL
59+
- command:
60+
- /manager
61+
args:
62+
- --enable-leader-election
63+
volumeMounts:
64+
- mountPath: /root/.ssh/
65+
name: ssh
66+
readOnly: true
67+
envFrom:
68+
- secretRef:
69+
name: peer-pods-secret
70+
optional: true
71+
- configMapRef:
72+
name: peer-pods-cm
73+
optional: true
74+
image: controller:latest
75+
name: manager
76+
env:
77+
- name: PEERPODS_NAMESPACE
78+
value: "openshift-sandboxed-containers-operator"
79+
- name: RELATED_IMAGE_KATA_MONITOR
80+
value: quay.io/openshift_sandboxed_containers/openshift-sandboxed-containers-monitor:latest
81+
- name: SANDBOXED_CONTAINERS_EXTENSION
82+
value: kata-containers
83+
- name: RELATED_IMAGE_CAA
84+
value: registry.redhat.io/openshift-sandboxed-containers/osc-cloud-api-adaptor-rhel9:latest
85+
- name: RELATED_IMAGE_PEERPODS_WEBHOOK
86+
value: "quay.io/confidential-containers/peer-pods-webhook:latest"
87+
imagePullPolicy: Always
88+
resources:
89+
limits:
90+
cpu: 200m
91+
memory: 100Mi
92+
requests:
93+
cpu: 100m
94+
memory: 40Mi
95+
securityContext:
96+
allowPrivilegeEscalation: false
97+
capabilities:
98+
drop:
99+
- ALL
102100
terminationGracePeriodSeconds: 10

config/peerpods/credentials-requests/credentials_request_aws.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

config/peerpods/credentials-requests/credentials_request_azure.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

config/peerpods/local/configuration-remote.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -565,13 +565,6 @@ experimental=[]
565565
# (default: false)
566566
service_offload = true
567567

568-
# Image request timeout in seconds.
569-
# If specified, indicates the image request timeout in the guest needed for the workload(s)
570-
# If unspecified then it will be set @DEFIMAGEREQUESTTIMEOUT@ second(s)
571-
# to reduce image pull failures caused by network problems and quickly obtain request failure information at the same time.
572-
573-
image_request_timeout = 900
574-
575568
# Container image decryption keys provisioning.
576569
# Applies only if service_offload is true.
577570
# Keys can be provisioned locally (e.g. through a special command or

0 commit comments

Comments
 (0)