Skip to content

Commit c954eb2

Browse files
committed
fix(runtime): close bootstrap gaps for clean micro1 validation
1 parent eb335d5 commit c954eb2

12 files changed

Lines changed: 72 additions & 10 deletions

File tree

Dockerfile.agent

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ RUN --mount=type=cache,id=guest-gomod,target=/root/go/pkg/mod \
2424
--mount=type=cache,id=guest-gobuild,target=/root/.cache/go-build \
2525
CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -o guest-agent ./cmd/guest-agent
2626

27-
FROM gcr.io/distroless/static:nonroot AS runtime
27+
FROM alpine:3.21 AS runtime
2828
WORKDIR /
29-
COPY --from=agent-builder /workspace/agent .
29+
RUN apk add --no-cache e2fsprogs
30+
COPY --from=agent-builder /workspace/agent /agent
3031
COPY --from=guest-agent-builder /workspace/guest-agent /opt/imp/guest-agent
3132
USER 65532:65532
3233
ENTRYPOINT ["/agent"]

charts/imp-crds/templates/impvms.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,12 @@ spec:
748748
a node.
749749
format: date-time
750750
type: string
751+
startedAt:
752+
description: |-
753+
StartedAt is the time the VM last transitioned to phase Starting.
754+
Used to detect and time out stuck start attempts.
755+
format: date-time
756+
type: string
751757
type: object
752758
type: object
753759
served: true
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
suite: impvms CRD schema
2+
templates:
3+
- templates/impvms.yaml
4+
tests:
5+
- it: includes startedAt in ImpVM status schema
6+
template: templates/impvms.yaml
7+
asserts:
8+
- isKind:
9+
of: CustomResourceDefinition
10+
- equal:
11+
path: spec.versions[0].schema.openAPIV3Schema.properties.status.properties.startedAt.type
12+
value: string

charts/imp/templates/agent/clusterrole.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,19 @@ rules:
1616
- apiGroups: ["imp.dev"]
1717
resources:
1818
- impvmclasses
19-
verbs: [get]
19+
verbs: [get, list, watch]
20+
- apiGroups: ["imp.dev"]
21+
resources:
22+
- clusterimpnodeprofiles
23+
verbs: [get, list, watch]
24+
- apiGroups: ["imp.dev"]
25+
resources:
26+
- impvmsnapshots
27+
verbs: [get, list, watch, update, patch]
28+
- apiGroups: ["imp.dev"]
29+
resources:
30+
- impvmsnapshots/status
31+
verbs: [get, update, patch]
2032
- apiGroups: ["imp.dev"]
2133
resources:
2234
- impnetworks

charts/imp/templates/operator/deployment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{{- $webhooksEnabled := and .Values.webhook.enabled .Values.webhook.certManager.enabled }}
1+
{{- $webhookEnabled := default true .Values.webhook.enabled }}
2+
{{- $webhooksEnabled := and $webhookEnabled .Values.webhook.certManager.enabled }}
23
apiVersion: apps/v1
34
kind: Deployment
45
metadata:

charts/imp/templates/operator/service.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{{- $webhooksEnabled := and .Values.webhook.enabled .Values.webhook.certManager.enabled }}
1+
{{- $webhookEnabled := default true .Values.webhook.enabled }}
2+
{{- $webhooksEnabled := and $webhookEnabled .Values.webhook.certManager.enabled }}
23
apiVersion: v1
34
kind: Service
45
metadata:

charts/imp/templates/webhook/certificate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.webhook.enabled .Values.webhook.certManager.enabled }}
1+
{{- if and (default true .Values.webhook.enabled) .Values.webhook.certManager.enabled }}
22
apiVersion: cert-manager.io/v1
33
kind: Certificate
44
metadata:

charts/imp/templates/webhook/issuer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.webhook.enabled .Values.webhook.certManager.enabled (not .Values.webhook.certManager.issuerRef.name) }}
1+
{{- if and (default true .Values.webhook.enabled) .Values.webhook.certManager.enabled (not .Values.webhook.certManager.issuerRef.name) }}
22
apiVersion: cert-manager.io/v1
33
kind: Issuer
44
metadata:

charts/imp/templates/webhook/mutatingwebhook.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.webhook.enabled .Values.webhook.certManager.enabled }}
1+
{{- if and (default true .Values.webhook.enabled) .Values.webhook.certManager.enabled }}
22
apiVersion: admissionregistration.k8s.io/v1
33
kind: MutatingWebhookConfiguration
44
metadata:

charts/imp/templates/webhook/validatingwebhook.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.webhook.enabled .Values.webhook.certManager.enabled }}
1+
{{- if and (default true .Values.webhook.enabled) .Values.webhook.certManager.enabled }}
22
apiVersion: admissionregistration.k8s.io/v1
33
kind: ValidatingWebhookConfiguration
44
metadata:

0 commit comments

Comments
 (0)