Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ $(call add-crd-gen,authorization,./authorization/v1,./authorization/v1,./authori
$(call add-crd-gen,config,./config/v1,./config/v1,./config/v1)
$(call add-crd-gen,console,./console/v1,./console/v1,./console/v1)
$(call add-crd-gen,imageregistry,./imageregistry/v1,./imageregistry/v1,./imageregistry/v1)
$(call add-crd-gen,machineconfiguration,./machineconfiguration/v1,./machineconfiguration/v1,./machineconfiguration/v1)
$(call add-crd-gen,operator,./operator/v1,./operator/v1,./operator/v1)
$(call add-crd-gen,operator-alpha,./operator/v1alpha1,./operator/v1alpha1,./operator/v1alpha1)
$(call add-crd-gen,operatoringress,./operatoringress/v1,./operatoringress/v1,./operatoringress/v1)
Expand Down
2 changes: 2 additions & 0 deletions hack/lib/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ image/v1 \
imageregistry/v1 \
kubecontrolplane/v1 \
legacyconfig/v1 \
machineconfiguration/v1 \
network/v1 \
oauth/v1 \
openshiftcontrolplane/v1 \
Expand All @@ -39,6 +40,7 @@ github.com/openshift/api/apps/v1,\
github.com/openshift/api/authorization/v1,\
github.com/openshift/api/build/v1,\
github.com/openshift/api/image/v1,\
github.com/openshift/api/machineconfiguration/v1,\
github.com/openshift/api/network/v1,\
github.com/openshift/api/oauth/v1,\
github.com/openshift/api/project/v1,\
Expand Down
2 changes: 1 addition & 1 deletion hack/update-deepcopy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ verify="${VERIFY:-}"
GOFLAGS="" bash ${CODEGEN_PKG}/generate-groups.sh "deepcopy" \
github.com/openshift/api/generated \
github.com/openshift/api \
"apps:v1 authorization:v1 build:v1 config:v1 console:v1 image:v1,docker10,dockerpre012 imageregistry:v1 kubecontrolplane:v1 legacyconfig:v1 network:v1 oauth:v1 openshiftcontrolplane:v1 operator:v1 operator:v1alpha1 operatoringress:v1 osin:v1 project:v1 quota:v1 route:v1 samples:v1 security:v1 servicecertsigner:v1alpha1 template:v1 user:v1" \
"apps:v1 authorization:v1 build:v1 config:v1 console:v1 image:v1,docker10,dockerpre012 imageregistry:v1 kubecontrolplane:v1 legacyconfig:v1 machineconfiguration:v1 network:v1 oauth:v1 openshiftcontrolplane:v1 operator:v1 operator:v1alpha1 operatoringress:v1 osin:v1 project:v1 quota:v1 route:v1 samples:v1 security:v1 servicecertsigner:v1alpha1 template:v1 user:v1" \
--go-header-file ${SCRIPT_ROOT}/hack/empty.txt \
${verify}

8 changes: 8 additions & 0 deletions machineconfiguration/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
reviewers:
- ashcrow
- cgwalters
- ericavonb
- kikisdeliveryservice
- runcom
- sinnykumari
- yuqi-zhang
26 changes: 26 additions & 0 deletions machineconfiguration/install.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package machineconfiguration

import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1"
)

const (
GroupName = "machineconfiguration.openshift.io"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this group already exists and this is a straight move?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

)

var (
SchemeBuilder = runtime.NewSchemeBuilder(machineconfigurationv1.Install)
// Install is a function which adds every version of this group to a scheme
Install = SchemeBuilder.AddToScheme
)

func Resource(resource string) schema.GroupResource {
return schema.GroupResource{Group: GroupName, Resource: resource}
}

func Kind(kind string) schema.GroupKind {
return schema.GroupKind{Group: GroupName, Kind: kind}
}
166 changes: 166 additions & 0 deletions machineconfiguration/v1/containerruntimeconfig.crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: containerruntimeconfigs.machineconfiguration.openshift.io
labels:
"openshift.io/operator-managed": ""
spec:
group: machineconfiguration.openshift.io
names:
kind: ContainerRuntimeConfig
listKind: ContainerRuntimeConfigList
plural: containerruntimeconfigs
singular: containerruntimeconfig
shortNames:
- ctrcfg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this already present in your CRD manifest today? We discourage shortnames on resources that are infrequently used by cluster-admins.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, already present

scope: Cluster
preserveUnknownFields: false
subresources:
status: {}
versions:
- name: v1
served: true
storage: true
"validation":
"openAPIV3Schema":
description: ContainerRuntimeConfig describes a customized Container Runtime
configuration.
type: object
required:
- spec
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ContainerRuntimeConfigSpec defines the desired state of ContainerRuntimeConfig
type: object
properties:
containerRuntimeConfig:
description: ContainerRuntimeConfiguration defines the tuneables of
the container runtime
type: object
required:
- logSizeMax
- overlaySize
properties:
logLevel:
description: logLevel specifies the verbosity of the logs based
on the level it is set to. Options are fatal, panic, error, warn,
info, and debug.
type: string
logSizeMax:
description: logSizeMax specifies the Maximum size allowed for the
container log file. Negative numbers indicate that no size limit
is imposed. If it is positive, it must be >= 8192 to match/exceed
conmon's read buffer.
type: string
overlaySize:
description: 'overlaySize specifies the maximum size of a container
image. This flag can be used to set quota on the size of container
images. (default: 10GB)'
type: string
pidsLimit:
description: pidsLimit specifies the maximum number of processes
allowed in a container
type: integer
format: int64
machineConfigPoolSelector:
description: A label selector is a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. An empty
label selector matches all objects. A null label selector matches
no objects.
type: object
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
type: array
items:
description: A label selector requirement is a selector that contains
values, a key, and an operator that relates the key and values.
type: object
required:
- key
- operator
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to a
set of values. Valid operators are In, NotIn, Exists and
DoesNotExist.
type: string
values:
description: values is an array of string values. If the operator
is In or NotIn, the values array must be non-empty. If the
operator is Exists or DoesNotExist, the values array must
be empty. This array is replaced during a strategic merge
patch.
type: array
items:
type: string
matchLabels:
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator is
"In", and the values array contains only "value". The requirements
are ANDed.
type: object
additionalProperties:
type: string
status:
description: ContainerRuntimeConfigStatus defines the observed state of
a ContainerRuntimeConfig
type: object
properties:
conditions:
description: conditions represents the latest available observations
of current state.
type: array
items:
description: ContainerRuntimeConfigCondition defines the state of
the ContainerRuntimeConfig
type: object
required:
- lastTransitionTime
- status
- type
properties:
lastTransitionTime:
description: lastTransitionTime is the time of the last update
to the current status object.
type: string
format: date-time
nullable: true
message:
description: message provides additional information about the
current condition. This is only to be consumed by humans.
type: string
reason:
description: reason is the reason for the condition's last transition. Reasons
are PascalCase
type: string
status:
description: status of the condition, one of True, False, Unknown.
type: string
type:
description: type specifies the state of the operator's reconciliation
functionality.
type: string
observedGeneration:
description: observedGeneration represents the generation observed by
the controller.
type: integer
format: int64
7 changes: 7 additions & 0 deletions machineconfiguration/v1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// +k8s:deepcopy-gen=package,register
// +k8s:defaulter-gen=TypeMeta
// +k8s:openapi-gen=true

// +groupName=machineconfiguration.openshift.io
// Package v1 is the v1 version of the API.
package v1
Loading