diff --git a/Makefile b/Makefile index 089ea20ab1c..3e8485b7af7 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,7 @@ openapi-generate-java-classes: cd kubernetes-model-generator/openshift-model-machine && mvn -Pgenerate clean install cd kubernetes-model-generator/openshift-model-machineconfiguration && mvn -Pgenerate clean install cd kubernetes-model-generator/openshift-model-monitoring && mvn -Pgenerate clean install + cd kubernetes-model-generator/openshift-model-tuned && mvn -Pgenerate clean install # Legacy generation of the model: TODO: remove .PHONY: generate-model-legacy diff --git a/kubernetes-model-generator/generateModel.sh b/kubernetes-model-generator/generateModel.sh index 1640d20d35e..232dd8757d7 100755 --- a/kubernetes-model-generator/generateModel.sh +++ b/kubernetes-model-generator/generateModel.sh @@ -24,7 +24,6 @@ ABSOLUTE_BASEDIR=$(realpath "$BASEDIR") declare -a modules=( "openshift-model-hive" "openshift-model-installer" - "openshift-model-tuned" "openshift-model-whereabouts" "openshift-model-storageversionmigrator" "../extensions/knative/generator" diff --git a/kubernetes-model-generator/openapi/generator/cmd/openapi.go b/kubernetes-model-generator/openapi/generator/cmd/openapi.go index 68f5c7a8c51..113e82b5e32 100644 --- a/kubernetes-model-generator/openapi/generator/cmd/openapi.go +++ b/kubernetes-model-generator/openapi/generator/cmd/openapi.go @@ -26,6 +26,7 @@ import ( openshiftconfigv1 "github.com/openshift/api/config/v1" openshiftcloudcredentialoperatorv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" openshiftclusternetworkoperatorv1 "github.com/openshift/cluster-network-operator/pkg/apis/network/v1" + openshiftclusternodetuningoperatorv1 "github.com/openshift/cluster-node-tuning-operator/pkg/apis/tuned/v1" operatorframeworkv1 "github.com/operator-framework/api/pkg/operators/v1" operatorframeworkv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" olm "github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1" @@ -54,8 +55,9 @@ var openApiRun = func(cobraCmd *cobra.Command, args []string) { //openshiftbaremetaloperatorv1alpha1.GroupVersion.String(), operatorframeworkv1alpha1.SchemeGroupVersion.String(), operatorframeworkv1.GroupVersion.String(), - openshiftclusternetworkoperatorv1.GroupVersion.String(), openshiftcloudcredentialoperatorv1.GroupVersion.String(), + openshiftclusternetworkoperatorv1.GroupVersion.String(), + openshiftclusternodetuningoperatorv1.SchemeGroupVersion.String(), olm.SchemeGroupVersion.String(), prometheusoperatorv1.SchemeGroupVersion.String(), }) diff --git a/kubernetes-model-generator/openapi/generator/go.mod b/kubernetes-model-generator/openapi/generator/go.mod index b3f0a28e88d..cc6d764667d 100644 --- a/kubernetes-model-generator/openapi/generator/go.mod +++ b/kubernetes-model-generator/openapi/generator/go.mod @@ -10,8 +10,10 @@ require ( github.com/openshift/api v3.9.0+incompatible github.com/openshift/cloud-credential-operator v0.0.0-20240910052617-d668c182b0e3 github.com/openshift/cluster-network-operator v0.0.0-20240912134426-a3188633549d + github.com/openshift/cluster-node-tuning-operator v0.0.0-20241001165112-1685a8fc1376 github.com/operator-framework/api v0.27.0 github.com/operator-framework/operator-lifecycle-manager v0.0.0-00010101000000-000000000000 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.77.1 github.com/spf13/cobra v1.8.1 k8s.io/api v0.31.1 k8s.io/apiextensions-apiserver v0.31.1 @@ -33,7 +35,14 @@ replace github.com/operator-framework/api => github.com/marcnuri-forks/operator- // TODO: WIP while this gets merged or fixed https://github.com/operator-framework/operator-lifecycle-manager/pull/3406 replace github.com/operator-framework/operator-lifecycle-manager => github.com/marcnuri-forks/operator-lifecycle-manager v0.0.0-20241002090802-7539192fbf96 -require github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.77.1 +// Required by some openshift operator dependencies, update to latest Kuberentes Version +replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.31.1 + +replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.31.1 + +replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.31.1 + +replace k8s.io/mount-utils => k8s.io/mount-utils v0.31.1 require ( github.com/antlr4-go/antlr/v4 v4.13.0 // indirect diff --git a/kubernetes-model-generator/openapi/generator/go.sum b/kubernetes-model-generator/openapi/generator/go.sum index f09057e28af..01221b7bc90 100644 --- a/kubernetes-model-generator/openapi/generator/go.sum +++ b/kubernetes-model-generator/openapi/generator/go.sum @@ -48,7 +48,7 @@ github.com/containers/ocicrypt v1.2.0 h1:X14EgRK3xNFvJEfI5O4Qn4T3E25ANudSOZz/sir github.com/containers/ocicrypt v1.2.0/go.mod h1:ZNviigQajtdlxIZGibvblVuIFBKIuUI2M0QM12SD31U= github.com/containers/storage v1.55.0 h1:wTWZ3YpcQf1F+dSP4KxG9iqDfpQY1otaUXjPpffuhgg= github.com/containers/storage v1.55.0/go.mod h1:28cB81IDk+y7ok60Of6u52RbCeBRucbFOeLunhER1RQ= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -98,6 +98,7 @@ github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= @@ -200,6 +201,8 @@ github.com/openshift/cloud-credential-operator v0.0.0-20240910052617-d668c182b0e github.com/openshift/cloud-credential-operator v0.0.0-20240910052617-d668c182b0e3/go.mod h1:4AWWBNPuWzPtT77xDONlObrazPlBCKXd+16lupnIrQc= github.com/openshift/cluster-network-operator v0.0.0-20240912134426-a3188633549d h1:9Xf/80gDpRc33FwCEJ6L2/DF1yU/4L6QjoYxKexDzvo= github.com/openshift/cluster-network-operator v0.0.0-20240912134426-a3188633549d/go.mod h1:qeN8u3CfzClFoykTdlvn0kKngBuVmb3VvWHA51UxiOI= +github.com/openshift/cluster-node-tuning-operator v0.0.0-20241001165112-1685a8fc1376 h1:XOj/kwz+iOCasKM2Y+cDSbb3bRaaIFcJxXb/qYZhKhU= +github.com/openshift/cluster-node-tuning-operator v0.0.0-20241001165112-1685a8fc1376/go.mod h1:rXqYaoIJhAbETKVgBxsz7bBstuhPgA3MPvWYMUFMOF8= github.com/operator-framework/operator-registry v1.47.0 h1:Imr7X/W6FmXczwpIOXfnX8d6Snr1dzwWxkMG+lLAfhg= github.com/operator-framework/operator-registry v1.47.0/go.mod h1:CJ3KcP8uRxtC8l9caM1RsV7r7jYlKAd452tcxcgXyTQ= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= diff --git a/kubernetes-model-generator/openapi/generator/pkg/openshift/openshift.go b/kubernetes-model-generator/openapi/generator/pkg/openshift/openshift.go index 67ab8c3c172..cce7c00c666 100644 --- a/kubernetes-model-generator/openapi/generator/pkg/openshift/openshift.go +++ b/kubernetes-model-generator/openapi/generator/pkg/openshift/openshift.go @@ -26,8 +26,9 @@ var PackagePatterns = []string{ "github.com/openshift/api/.../v...", // CRDs don't provide info for reused types //"github.com/metal3-io/baremetal-operator/apis/metal3.io/v...", - "github.com/openshift/cluster-network-operator/pkg/apis/.../v...", "github.com/openshift/cloud-credential-operator/pkg/apis/.../v...", + "github.com/openshift/cluster-network-operator/pkg/apis/.../v...", + "github.com/openshift/cluster-node-tuning-operator/pkg/apis/tuned/v...", "github.com/operator-framework/api/pkg/operators/v...", "github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v...", "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v...", diff --git a/kubernetes-model-generator/openapi/generator/tools/generator/openapi.go b/kubernetes-model-generator/openapi/generator/tools/generator/openapi.go index fe9aad51a08..d73a67a6e28 100644 --- a/kubernetes-model-generator/openapi/generator/tools/generator/openapi.go +++ b/kubernetes-model-generator/openapi/generator/tools/generator/openapi.go @@ -25,6 +25,7 @@ import ( //openshiftbaremetaloperatorv1alpha1 "github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1" openshiftcloudcredentialoperatorv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" openshiftclusternetworkoperatorv1 "github.com/openshift/cluster-network-operator/pkg/apis/network/v1" + openshiftclusternodetuningoperatorv1 "github.com/openshift/cluster-node-tuning-operator/pkg/apis/tuned/v1" operatorframeworkv1 "github.com/operator-framework/api/pkg/operators/v1" operatorframeworkv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" olm "github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1" @@ -40,8 +41,9 @@ func main() { operatorframeworkv1alpha1.SchemeGroupVersion.String(), operatorframeworkv1.GroupVersion.String(), //openshiftbaremetaloperatorv1alpha1.GroupVersion.String(), - openshiftclusternetworkoperatorv1.GroupVersion.String(), openshiftcloudcredentialoperatorv1.GroupVersion.String(), + openshiftclusternetworkoperatorv1.GroupVersion.String(), + openshiftclusternodetuningoperatorv1.SchemeGroupVersion.String(), olm.SchemeGroupVersion.String(), prometheusoperatorv1.SchemeGroupVersion.String(), }) diff --git a/kubernetes-model-generator/openapi/schemas/openshift-generated.json b/kubernetes-model-generator/openapi/schemas/openshift-generated.json index 4c2e9e82e65..f831a3c2413 100644 --- a/kubernetes-model-generator/openapi/schemas/openshift-generated.json +++ b/kubernetes-model-generator/openapi/schemas/openshift-generated.json @@ -101513,6 +101513,473 @@ "Scope": "Namespaced" } }, + "io.openshift.tuned.v1.OperandConfig": { + "type": "object", + "properties": { + "debug": { + "description": "turn debugging on/off for the TuneD daemon: true/false (default is false)", + "type": "boolean" + }, + "tunedConfig": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.TuneDConfig" + }, + "verbosity": { + "description": "klog logging verbosity", + "type": "integer", + "format": "int32" + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "OperandConfig", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.Profile": { + "description": "Profile is a specification for a Profile resource.", + "type": "object", + "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": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.ProfileSpec" + }, + "status": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.ProfileStatus" + } + }, + "x-fabric8-info": { + "Type": "object", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "Profile", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.ProfileConfig": { + "type": "object", + "required": [ + "tunedProfile" + ], + "properties": { + "debug": { + "description": "option to debug TuneD daemon execution", + "type": "boolean", + "default": false + }, + "providerName": { + "description": "Name of the cloud provider as taken from the Node providerID: \u003cProviderName\u003e://\u003cProviderSpecificNodeID\u003e", + "type": "string" + }, + "tunedConfig": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.TuneDConfig" + }, + "tunedProfile": { + "description": "TuneD profile to apply", + "type": "string", + "default": "" + }, + "verbosity": { + "description": "klog logging verbosity", + "type": "integer", + "format": "int32", + "default": 0 + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "ProfileConfig", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.ProfileList": { + "description": "ProfileList is a list of Profile resources.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.Profile" + } + }, + "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": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-fabric8-info": { + "Type": "list", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "ProfileList", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.ProfileSpec": { + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.ProfileConfig" + }, + "profile": { + "description": "Tuned profiles.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.TunedProfile" + } + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "ProfileSpec", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.ProfileStatus": { + "description": "ProfileStatus is the status for a Profile resource; the status is for internal use only and its fields may be changed/removed in the future.", + "type": "object", + "required": [ + "tunedProfile" + ], + "properties": { + "conditions": { + "description": "conditions represents the state of the per-node Profile application", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.ProfileStatusCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "tunedProfile": { + "description": "the current profile in use by the Tuned daemon", + "type": "string", + "default": "" + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "ProfileStatus", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.ProfileStatusCondition": { + "description": "ProfileStatusCondition represents a partial state of the per-node Profile application.", + "type": "object", + "required": [ + "type", + "status", + "lastTransitionTime" + ], + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the time of the last update to the current status property.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "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 CamelCase reason for the condition's current status.", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "type": "string", + "default": "" + }, + "type": { + "description": "type specifies the aspect reported by this condition.", + "type": "string", + "default": "" + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "ProfileStatusCondition", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.TuneDConfig": { + "description": "Global configuration for the TuneD daemon as defined in tuned-main.conf", + "type": "object", + "properties": { + "reapply_sysctl": { + "description": "turn reapply_sysctl functionality on/off for the TuneD daemon: true/false", + "type": "boolean" + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "TuneDConfig", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.Tuned": { + "description": "Tuned is a collection of rules that allows cluster-wide deployment of node-level sysctls and more flexibility to add custom tuning specified by user needs. These rules are translated and passed to all containerized Tuned daemons running in the cluster in the format that the daemons understand. The responsibility for applying the node-level tuning then lies with the containerized Tuned daemons. More info: https://github.com/openshift/cluster-node-tuning-operator", + "type": "object", + "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": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec is the specification of the desired behavior of Tuned. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.TunedSpec" + }, + "status": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.TunedStatus" + } + }, + "x-fabric8-info": { + "Type": "object", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "Tuned", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.TunedList": { + "description": "TunedList is a list of Tuned resources.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.Tuned" + } + }, + "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": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-fabric8-info": { + "Type": "list", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "TunedList", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.TunedMatch": { + "description": "Rules governing application of a Tuned profile.", + "type": "object", + "required": [ + "label" + ], + "properties": { + "label": { + "description": "Node or Pod label name.", + "type": "string" + }, + "match": { + "description": "Additional rules governing application of the tuned profile connected by logical AND operator.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.TunedMatch" + } + }, + "type": { + "description": "Match type: [node/pod]. If omitted, \"node\" is assumed.", + "type": "string" + }, + "value": { + "description": "Node or Pod label value. If omitted, the presence of label name is enough to match.", + "type": "string" + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "TunedMatch", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.TunedProfile": { + "description": "A Tuned profile.", + "type": "object", + "required": [ + "name", + "data" + ], + "properties": { + "data": { + "description": "Specification of the Tuned profile to be consumed by the Tuned daemon.", + "type": "string" + }, + "name": { + "description": "Name of the Tuned profile to be used in the recommend section.", + "type": "string" + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "TunedProfile", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.TunedRecommend": { + "description": "Selection logic for a single Tuned profile.", + "type": "object", + "required": [ + "profile", + "priority" + ], + "properties": { + "machineConfigLabels": { + "description": "MachineConfigLabels specifies the labels for a MachineConfig. The MachineConfig is created automatically to apply additional host settings (e.g. kernel boot parameters) profile 'Profile' needs and can only be applied by creating a MachineConfig. This involves finding all MachineConfigPools with machineConfigSelector matching the MachineConfigLabels and setting the profile 'Profile' on all nodes that match the MachineConfigPools' nodeSelectors.", + "type": "object", + "additionalProperties": { + "type": "string", + "default": "" + } + }, + "match": { + "description": "Rules governing application of a Tuned profile connected by logical OR operator.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.TunedMatch" + } + }, + "operand": { + "description": "Optional operand configuration.", + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.OperandConfig" + }, + "priority": { + "description": "Tuned profile priority. Highest priority is 0.", + "type": "integer", + "format": "int64" + }, + "profile": { + "description": "Name of the Tuned profile to recommend.", + "type": "string" + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "TunedRecommend", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.TunedSpec": { + "type": "object", + "properties": { + "managementState": { + "description": "managementState indicates whether the registry instance represented by this config instance is under operator management or not. Valid values are Force, Managed, Unmanaged, and Removed.", + "type": "string" + }, + "profile": { + "description": "Tuned profiles.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.TunedProfile" + } + }, + "recommend": { + "description": "Selection logic for all Tuned profiles.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.openshift.tuned.v1.TunedRecommend" + } + } + }, + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "TunedSpec", + "Scope": "Namespaced" + } + }, + "io.openshift.tuned.v1.TunedStatus": { + "description": "TunedStatus is the status for a Tuned resource.", + "type": "object", + "x-fabric8-info": { + "Type": "nested", + "Group": "tuned.openshift.io", + "Version": "v1", + "Kind": "TunedStatus", + "Scope": "Namespaced" + } + }, "io.openshift.user.v1.Group": { "description": "Group represents a referenceable set of Users\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "type": "object", diff --git a/kubernetes-model-generator/openshift-model-tuned/Makefile b/kubernetes-model-generator/openshift-model-tuned/Makefile deleted file mode 100644 index c09a7003874..00000000000 --- a/kubernetes-model-generator/openshift-model-tuned/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (C) 2015 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -SHELL := /bin/bash - -all: build - -build: gobuild - mvn -Pgenerate clean install -DskipTests - -gobuild: - CGO_ENABLED=0 GO15VENDOREXPERIMENT=1 go build -a ./cmd/generate/generate.go - ./generate > src/main/resources/schema/kube-schema.json - ./generate validation > src/main/resources/schema/validation-schema.json diff --git a/kubernetes-model-generator/openshift-model-tuned/cmd/generate/generate.go b/kubernetes-model-generator/openshift-model-tuned/cmd/generate/generate.go deleted file mode 100644 index 017b8ee421a..00000000000 --- a/kubernetes-model-generator/openshift-model-tuned/cmd/generate/generate.go +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (C) 2015 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package main - -import ( - "bytes" - "encoding/json" - "fmt" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apimachineryversion "k8s.io/apimachinery/pkg/version" - runtime "k8s.io/apimachinery/pkg/runtime" - "log" - "reflect" - "strings" - "time" - tuned "github.com/openshift/cluster-node-tuning-operator/pkg/apis/tuned/v1" - - "os" - - "github.com/fabric8io/kubernetes-client/kubernetes-model-generator/pkg/schemagen" -) - -type Schema struct { - Info apimachineryversion.Info - APIGroup metav1.APIGroup - APIGroupList metav1.APIGroupList - BaseKubernetesList metav1.List - ObjectMeta metav1.ObjectMeta - TypeMeta metav1.TypeMeta - Status metav1.Status - Patch metav1.Patch - Time metav1.Time - Profile tuned.Profile - ProfileList tuned.ProfileList - Tuned tuned.Tuned - TunedList tuned.TunedList -} - -func main() { - packages := []schemagen.PackageDescriptor{ - {"k8s.io/api/core/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_core_", false}, - {"k8s.io/apimachinery/pkg/api/resource", "", "io.fabric8.kubernetes.api.model", "kubernetes_resource_", false}, - {"k8s.io/apimachinery/pkg/util/intstr", "", "io.fabric8.kubernetes.api.model", "kubernetes_apimachinery_pkg_util_intstr_", false}, - {"k8s.io/apimachinery/pkg/runtime", "", "io.fabric8.openshift.api.model.runtime", "kubernetes_apimachinery_pkg_runtime_", false}, - {"k8s.io/apimachinery/pkg/version", "", "io.fabric8.kubernetes.api.model.version", "kubernetes_apimachinery_pkg_version_", false}, - {"k8s.io/kubernetes/pkg/util", "", "io.fabric8.kubernetes.api.model", "kubernetes_util_", false}, - {"k8s.io/kubernetes/pkg/api/errors", "", "io.fabric8.kubernetes.api.model", "kubernetes_errors_", false}, - {"k8s.io/kubernetes/pkg/api/unversioned", "", "io.fabric8.kubernetes.api.model", "api_", false}, - {"k8s.io/apimachinery/pkg/apis/meta/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_apimachinery_", false}, - {"github.com/openshift/api/config/v1", "", "io.fabric8.openshift.api.model", "os_config_v1_", false}, - {"github.com/openshift/cluster-node-tuning-operator/pkg/apis/tuned/v1", "tuned", "io.fabric8.openshift.api.model.tuned.v1", "os_tuned_v1_", true}, - } - - typeMap := map[reflect.Type]reflect.Type{ - reflect.TypeOf(time.Time{}): reflect.TypeOf(""), - reflect.TypeOf(struct{}{}): reflect.TypeOf(""), - } - manualTypeMap := map[reflect.Type]string { - reflect.TypeOf(runtime.RawExtension{}): "java.util.Map", - } - schema, err := schemagen.GenerateSchema(reflect.TypeOf(Schema{}), packages, typeMap, manualTypeMap,"tuned") - if err != nil { - fmt.Fprintf(os.Stderr, "An error occurred: %v", err) - return - } - - args := os.Args[1:] - if len(args) < 1 || args[0] != "validation" { - schema.Resources = nil - } - - b, err := json.Marshal(&schema) - if err != nil { - log.Fatal(err) - } - result := string(b) - result = strings.Replace(result, "\"additionalProperty\":", "\"additionalProperties\":", -1) - - var out bytes.Buffer - err = json.Indent(&out, []byte(result), "", " ") - if err != nil { - log.Fatal(err) - } - - fmt.Println(out.String()) -} diff --git a/kubernetes-model-generator/openshift-model-tuned/pom.xml b/kubernetes-model-generator/openshift-model-tuned/pom.xml index b9530fb20f2..3913c25eae9 100644 --- a/kubernetes-model-generator/openshift-model-tuned/pom.xml +++ b/kubernetes-model-generator/openshift-model-tuned/pom.xml @@ -43,41 +43,26 @@ io.fabric8 kubernetes-model-core - - io.fabric8 - kubernetes-model-common - - - io.fabric8 - openshift-model - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - false - - - - - - - generate - org.jsonschema2pojo - jsonschema2pojo-maven-plugin + io.fabric8 + openapi-model-generator-maven-plugin + + + + ${openapi.schema.openshift-generated} + + + ^io\.openshift\.tuned\..*$ + + + diff --git a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java deleted file mode 100644 index 19db56f61eb..00000000000 --- a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java +++ /dev/null @@ -1,204 +0,0 @@ - -package io.fabric8.kubernetes.api.model; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.fabric8.kubernetes.api.model.version.Info; -import io.fabric8.openshift.api.model.tuned.v1.Profile; -import io.fabric8.openshift.api.model.tuned.v1.ProfileList; -import io.fabric8.openshift.api.model.tuned.v1.Tuned; -import io.fabric8.openshift.api.model.tuned.v1.TunedList; - -@Generated("jsonschema2pojo") -public class KubeSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private Info info; - private ObjectMeta objectMeta; - private Patch patch; - private Profile profile; - private ProfileList profileList; - private Status status; - private String time; - private Tuned tuned; - private TunedList tunedList; - private TypeMeta typeMeta; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public KubeSchema() { - } - - public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, KubernetesList baseKubernetesList, Info info, ObjectMeta objectMeta, Patch patch, Profile profile, ProfileList profileList, Status status, String time, Tuned tuned, TunedList tunedList, TypeMeta typeMeta) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.info = info; - this.objectMeta = objectMeta; - this.patch = patch; - this.profile = profile; - this.profileList = profileList; - this.status = status; - this.time = time; - this.tuned = tuned; - this.tunedList = tunedList; - this.typeMeta = typeMeta; - } - - @JsonProperty("APIGroup") - public APIGroup getAPIGroup() { - return aPIGroup; - } - - @JsonProperty("APIGroup") - public void setAPIGroup(APIGroup aPIGroup) { - this.aPIGroup = aPIGroup; - } - - @JsonProperty("APIGroupList") - public APIGroupList getAPIGroupList() { - return aPIGroupList; - } - - @JsonProperty("APIGroupList") - public void setAPIGroupList(APIGroupList aPIGroupList) { - this.aPIGroupList = aPIGroupList; - } - - @JsonProperty("BaseKubernetesList") - public KubernetesList getBaseKubernetesList() { - return baseKubernetesList; - } - - @JsonProperty("BaseKubernetesList") - public void setBaseKubernetesList(KubernetesList baseKubernetesList) { - this.baseKubernetesList = baseKubernetesList; - } - - @JsonProperty("Info") - public Info getInfo() { - return info; - } - - @JsonProperty("Info") - public void setInfo(Info info) { - this.info = info; - } - - @JsonProperty("ObjectMeta") - public ObjectMeta getObjectMeta() { - return objectMeta; - } - - @JsonProperty("ObjectMeta") - public void setObjectMeta(ObjectMeta objectMeta) { - this.objectMeta = objectMeta; - } - - @JsonProperty("Patch") - public Patch getPatch() { - return patch; - } - - @JsonProperty("Patch") - public void setPatch(Patch patch) { - this.patch = patch; - } - - @JsonProperty("Profile") - public Profile getProfile() { - return profile; - } - - @JsonProperty("Profile") - public void setProfile(Profile profile) { - this.profile = profile; - } - - @JsonProperty("ProfileList") - public ProfileList getProfileList() { - return profileList; - } - - @JsonProperty("ProfileList") - public void setProfileList(ProfileList profileList) { - this.profileList = profileList; - } - - @JsonProperty("Status") - public Status getStatus() { - return status; - } - - @JsonProperty("Status") - public void setStatus(Status status) { - this.status = status; - } - - @JsonProperty("Time") - public String getTime() { - return time; - } - - @JsonProperty("Time") - public void setTime(String time) { - this.time = time; - } - - @JsonProperty("Tuned") - public Tuned getTuned() { - return tuned; - } - - @JsonProperty("Tuned") - public void setTuned(Tuned tuned) { - this.tuned = tuned; - } - - @JsonProperty("TunedList") - public TunedList getTunedList() { - return tunedList; - } - - @JsonProperty("TunedList") - public void setTunedList(TunedList tunedList) { - this.tunedList = tunedList; - } - - @JsonProperty("TypeMeta") - public TypeMeta getTypeMeta() { - return typeMeta; - } - - @JsonProperty("TypeMeta") - public void setTypeMeta(TypeMeta typeMeta) { - this.typeMeta = typeMeta; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - -} diff --git a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java deleted file mode 100644 index e041da19b00..00000000000 --- a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java +++ /dev/null @@ -1,204 +0,0 @@ - -package io.fabric8.kubernetes.api.model; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.fabric8.kubernetes.api.model.version.Info; -import io.fabric8.openshift.api.model.tuned.v1.Profile; -import io.fabric8.openshift.api.model.tuned.v1.ProfileList; -import io.fabric8.openshift.api.model.tuned.v1.Tuned; -import io.fabric8.openshift.api.model.tuned.v1.TunedList; - -@Generated("jsonschema2pojo") -public class ValidationSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private Info info; - private ObjectMeta objectMeta; - private Patch patch; - private Profile profile; - private ProfileList profileList; - private Status status; - private String time; - private Tuned tuned; - private TunedList tunedList; - private TypeMeta typeMeta; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ValidationSchema() { - } - - public ValidationSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, KubernetesList baseKubernetesList, Info info, ObjectMeta objectMeta, Patch patch, Profile profile, ProfileList profileList, Status status, String time, Tuned tuned, TunedList tunedList, TypeMeta typeMeta) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.info = info; - this.objectMeta = objectMeta; - this.patch = patch; - this.profile = profile; - this.profileList = profileList; - this.status = status; - this.time = time; - this.tuned = tuned; - this.tunedList = tunedList; - this.typeMeta = typeMeta; - } - - @JsonProperty("APIGroup") - public APIGroup getAPIGroup() { - return aPIGroup; - } - - @JsonProperty("APIGroup") - public void setAPIGroup(APIGroup aPIGroup) { - this.aPIGroup = aPIGroup; - } - - @JsonProperty("APIGroupList") - public APIGroupList getAPIGroupList() { - return aPIGroupList; - } - - @JsonProperty("APIGroupList") - public void setAPIGroupList(APIGroupList aPIGroupList) { - this.aPIGroupList = aPIGroupList; - } - - @JsonProperty("BaseKubernetesList") - public KubernetesList getBaseKubernetesList() { - return baseKubernetesList; - } - - @JsonProperty("BaseKubernetesList") - public void setBaseKubernetesList(KubernetesList baseKubernetesList) { - this.baseKubernetesList = baseKubernetesList; - } - - @JsonProperty("Info") - public Info getInfo() { - return info; - } - - @JsonProperty("Info") - public void setInfo(Info info) { - this.info = info; - } - - @JsonProperty("ObjectMeta") - public ObjectMeta getObjectMeta() { - return objectMeta; - } - - @JsonProperty("ObjectMeta") - public void setObjectMeta(ObjectMeta objectMeta) { - this.objectMeta = objectMeta; - } - - @JsonProperty("Patch") - public Patch getPatch() { - return patch; - } - - @JsonProperty("Patch") - public void setPatch(Patch patch) { - this.patch = patch; - } - - @JsonProperty("Profile") - public Profile getProfile() { - return profile; - } - - @JsonProperty("Profile") - public void setProfile(Profile profile) { - this.profile = profile; - } - - @JsonProperty("ProfileList") - public ProfileList getProfileList() { - return profileList; - } - - @JsonProperty("ProfileList") - public void setProfileList(ProfileList profileList) { - this.profileList = profileList; - } - - @JsonProperty("Status") - public Status getStatus() { - return status; - } - - @JsonProperty("Status") - public void setStatus(Status status) { - this.status = status; - } - - @JsonProperty("Time") - public String getTime() { - return time; - } - - @JsonProperty("Time") - public void setTime(String time) { - this.time = time; - } - - @JsonProperty("Tuned") - public Tuned getTuned() { - return tuned; - } - - @JsonProperty("Tuned") - public void setTuned(Tuned tuned) { - this.tuned = tuned; - } - - @JsonProperty("TunedList") - public TunedList getTunedList() { - return tunedList; - } - - @JsonProperty("TunedList") - public void setTunedList(TunedList tunedList) { - this.tunedList = tunedList; - } - - @JsonProperty("TypeMeta") - public TypeMeta getTypeMeta() { - return typeMeta; - } - - @JsonProperty("TypeMeta") - public void setTypeMeta(TypeMeta typeMeta) { - this.typeMeta = typeMeta; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - -} diff --git a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/OperandConfig.java b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/OperandConfig.java index 237b9e0b176..514a2db5c04 100644 --- a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/OperandConfig.java +++ b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/OperandConfig.java @@ -32,7 +32,8 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "debug", - "tunedConfig" + "tunedConfig", + "verbosity" }) @ToString @EqualsAndHashCode @@ -59,6 +60,8 @@ public class OperandConfig implements Editable , Kubernete private Boolean debug; @JsonProperty("tunedConfig") private TuneDConfig tunedConfig; + @JsonProperty("verbosity") + private Integer verbosity; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -69,10 +72,11 @@ public class OperandConfig implements Editable , Kubernete public OperandConfig() { } - public OperandConfig(Boolean debug, TuneDConfig tunedConfig) { + public OperandConfig(Boolean debug, TuneDConfig tunedConfig, Integer verbosity) { super(); this.debug = debug; this.tunedConfig = tunedConfig; + this.verbosity = verbosity; } @JsonProperty("debug") @@ -95,6 +99,16 @@ public void setTunedConfig(TuneDConfig tunedConfig) { this.tunedConfig = tunedConfig; } + @JsonProperty("verbosity") + public Integer getVerbosity() { + return verbosity; + } + + @JsonProperty("verbosity") + public void setVerbosity(Integer verbosity) { + this.verbosity = verbosity; + } + @JsonIgnore public OperandConfigBuilder edit() { return new OperandConfigBuilder(this); diff --git a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/Profile.java b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/Profile.java index f040650c90a..a7813c1ea35 100644 --- a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/Profile.java +++ b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/Profile.java @@ -18,6 +18,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; @@ -48,7 +49,7 @@ "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @@ -82,7 +83,7 @@ public class Profile implements Editable , HasMetadata, Namespac @JsonProperty("kind") private String kind = "Profile"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private ProfileSpec spec; @JsonProperty("status") @@ -97,7 +98,7 @@ public class Profile implements Editable , HasMetadata, Namespac public Profile() { } - public Profile(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, ProfileSpec spec, ProfileStatus status) { + public Profile(String apiVersion, String kind, ObjectMeta metadata, ProfileSpec spec, ProfileStatus status) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -147,12 +148,12 @@ public void setKind(String kind) { } @JsonProperty("metadata") - public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + public ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") - public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + public void setMetadata(ObjectMeta metadata) { this.metadata = metadata; } diff --git a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/ProfileConfig.java b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/ProfileConfig.java index 4d6d7b8d30b..41de86125fc 100644 --- a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/ProfileConfig.java +++ b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/ProfileConfig.java @@ -34,7 +34,8 @@ "debug", "providerName", "tunedConfig", - "tunedProfile" + "tunedProfile", + "verbosity" }) @ToString @EqualsAndHashCode @@ -65,6 +66,8 @@ public class ProfileConfig implements Editable , Kubernete private TuneDConfig tunedConfig; @JsonProperty("tunedProfile") private String tunedProfile; + @JsonProperty("verbosity") + private Integer verbosity; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -75,12 +78,13 @@ public class ProfileConfig implements Editable , Kubernete public ProfileConfig() { } - public ProfileConfig(Boolean debug, String providerName, TuneDConfig tunedConfig, String tunedProfile) { + public ProfileConfig(Boolean debug, String providerName, TuneDConfig tunedConfig, String tunedProfile, Integer verbosity) { super(); this.debug = debug; this.providerName = providerName; this.tunedConfig = tunedConfig; this.tunedProfile = tunedProfile; + this.verbosity = verbosity; } @JsonProperty("debug") @@ -123,6 +127,16 @@ public void setTunedProfile(String tunedProfile) { this.tunedProfile = tunedProfile; } + @JsonProperty("verbosity") + public Integer getVerbosity() { + return verbosity; + } + + @JsonProperty("verbosity") + public void setVerbosity(Integer verbosity) { + this.verbosity = verbosity; + } + @JsonIgnore public ProfileConfigBuilder edit() { return new ProfileConfigBuilder(this); diff --git a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/ProfileSpec.java b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/ProfileSpec.java index e5c9973440d..6a645f229a4 100644 --- a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/ProfileSpec.java +++ b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/ProfileSpec.java @@ -1,7 +1,9 @@ package io.fabric8.openshift.api.model.tuned.v1; +import java.util.ArrayList; import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; import javax.annotation.Generated; import com.fasterxml.jackson.annotation.JsonAnyGetter; @@ -31,7 +33,8 @@ @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ - "config" + "config", + "profile" }) @ToString @EqualsAndHashCode @@ -56,6 +59,9 @@ public class ProfileSpec implements Editable , KubernetesRes @JsonProperty("config") private ProfileConfig config; + @JsonProperty("profile") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List profile = new ArrayList<>(); @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -66,9 +72,10 @@ public class ProfileSpec implements Editable , KubernetesRes public ProfileSpec() { } - public ProfileSpec(ProfileConfig config) { + public ProfileSpec(ProfileConfig config, List profile) { super(); this.config = config; + this.profile = profile; } @JsonProperty("config") @@ -81,6 +88,17 @@ public void setConfig(ProfileConfig config) { this.config = config; } + @JsonProperty("profile") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getProfile() { + return profile; + } + + @JsonProperty("profile") + public void setProfile(List profile) { + this.profile = profile; + } + @JsonIgnore public ProfileSpecBuilder edit() { return new ProfileSpecBuilder(this); diff --git a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/TuneDConfig.java b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/TuneDConfig.java index 5d38d8521db..9cef1e0d2d2 100644 --- a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/TuneDConfig.java +++ b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/TuneDConfig.java @@ -55,7 +55,7 @@ public class TuneDConfig implements Editable , KubernetesRes { @JsonProperty("reapply_sysctl") - private Boolean reapplySysctl; + private Boolean reapply_sysctl; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -66,19 +66,19 @@ public class TuneDConfig implements Editable , KubernetesRes public TuneDConfig() { } - public TuneDConfig(Boolean reapplySysctl) { + public TuneDConfig(Boolean reapply_sysctl) { super(); - this.reapplySysctl = reapplySysctl; + this.reapply_sysctl = reapply_sysctl; } @JsonProperty("reapply_sysctl") - public Boolean getReapplySysctl() { - return reapplySysctl; + public Boolean getReapply_sysctl() { + return reapply_sysctl; } @JsonProperty("reapply_sysctl") - public void setReapplySysctl(Boolean reapplySysctl) { - this.reapplySysctl = reapplySysctl; + public void setReapply_sysctl(Boolean reapply_sysctl) { + this.reapply_sysctl = reapply_sysctl; } @JsonIgnore diff --git a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/Tuned.java b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/Tuned.java index fcd89abda0e..ea3c1ec9024 100644 --- a/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/Tuned.java +++ b/kubernetes-model-generator/openshift-model-tuned/src/generated/java/io/fabric8/openshift/api/model/tuned/v1/Tuned.java @@ -18,6 +18,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; @@ -48,7 +49,7 @@ "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @@ -82,7 +83,7 @@ public class Tuned implements Editable , HasMetadata, Namespaced @JsonProperty("kind") private String kind = "Tuned"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private TunedSpec spec; @JsonProperty("status") @@ -97,7 +98,7 @@ public class Tuned implements Editable , HasMetadata, Namespaced public Tuned() { } - public Tuned(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, TunedSpec spec, TunedStatus status) { + public Tuned(String apiVersion, String kind, ObjectMeta metadata, TunedSpec spec, TunedStatus status) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -147,12 +148,12 @@ public void setKind(String kind) { } @JsonProperty("metadata") - public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + public ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") - public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + public void setMetadata(ObjectMeta metadata) { this.metadata = metadata; }