Skip to content

Commit

Permalink
machineconfiguration/v1alpha1: add PinnedImageSet
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
  • Loading branch information
hexfusion committed Mar 21, 2024
1 parent cac7ffe commit 49f8b63
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 1,282 deletions.

This file was deleted.

This file was deleted.

3 changes: 3 additions & 0 deletions machineconfiguration/v1/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.PHONY: test
test:
make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="machineconfiguration.openshift.io/v1"
11 changes: 10 additions & 1 deletion machineconfiguration/v1/custom.machineconfigpool.testsuite.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Custom] MachineConfigPool"
crd: 0000_80_machineconfigpool-TechPreviewNoUpgrade.crd.yaml
crd: 0000_80_machine-config_01_machineconfigpools-CustomNoUpgrade.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal MachineConfigPool
initial: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
spec: {} # No spec is required for a MachineConfigPool
expected: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
spec: {}
- name: Should be able to create a PinnedImageSet
initial: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Default] MachineConfigPool"
crd: 0000_80_machineconfigpool-Default.crd.yaml
crd: 0000_80_machine-config_01_machineconfigpools-Default.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal MachineConfigPool
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[TechPreview] MachineConfigPool"
crd: 0000_80_machineconfigpool-TechPreviewNoUpgrade.crd.yaml
crd: 0000_80_machine-config_01_machineconfigpools-TechPreviewNoUpgrade.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal MachineConfigPool
initial: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
spec: {} # No spec is required for a MachineConfigPool
expected: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
spec: {}
- name: Should be able to create a PinnedImageSet
initial: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Custom] PinnedImageSet"
crd: 0000_80_pinnedimageset-CustomNoUpgrade.crd.yaml
crd: 0000_80_machine-config_01_pinnedimagesets-CustomNoUpgrade.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal PinnedImageSet
Expand Down Expand Up @@ -84,4 +84,4 @@ tests:
spec:
pinnedImages:
- name: "my-project/image@sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
expectedError: "Invalid value: \"string\": The OCI Image reference must be in the format host[:port][/namespace]/name@sha256:<digest> with a valid SHA256 digest"
expectedError: "Invalid value: \"string\": The OCI Image reference must be in the format host[:port][/namespace]/name@sha256:<digest> with a valid SHA256 digest"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[TechPreview] PinnedImageSet"
crd: 0000_80_pinnedimageset-TechPreviewNoUpgrade.crd.yaml
crd: 0000_80_machine-config_01_pinnedimagesets-TechPreviewNoUpgrade.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal PinnedImageSet
Expand Down
2 changes: 1 addition & 1 deletion machineconfiguration/v1alpha1/types_pinnedimageset.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=pinnedimagesets,scope=Cluster
// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1713
// +openshift:file-pattern=0000_80_pinnedimagesetMARKERS.crd.yaml
// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01
// +openshift:enable:FeatureGate=PinnedImages
// +kubebuilder:metadata:labels=openshift.io/operator-managed=

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ pinnedimagesets.machineconfiguration.openshift.io:
Category: ""
FeatureGates:
- PinnedImages
FilenameOperatorName: ""
FilenameOperatorOrdering: ""
FilenameRunLevel: ""
FilenameOperatorName: machine-config
FilenameOperatorOrdering: "01"
FilenameRunLevel: "0000_80"
GroupName: machineconfiguration.openshift.io
HasStatus: false
KindName: PinnedImageSet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/1713
api.openshift.io/filename-cvo-runlevel: "0000_80"
api.openshift.io/filename-operator: machine-config
api.openshift.io/filename-ordering: "01"
feature-gate.release.openshift.io/PinnedImages: "true"
labels:
openshift.io/operator-managed: ""
Expand Down

0 comments on commit 49f8b63

Please sign in to comment.