Skip to content

Commit

Permalink
chore: updated makefile rules for schema generation
Browse files Browse the repository at this point in the history
Explicit model generation is no longer needed

Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Oct 3, 2024
1 parent 63766b5 commit 10c0c10
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 77 deletions.
57 changes: 15 additions & 42 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# limitations under the License.
#

MAVEN_OPTIONS ?=
.DEFAULT_GOAL := quickly
MAVEN_OPTIONS ?= -T 1C
OPENAPI_DIR=$(realpath ./kubernetes-model-generator/openapi)
OPENAPI_GENERATOR_DIR=$(OPENAPI_DIR)/generator
OPENAPI_GENERATOR_BINARY_NAME=generator
Expand All @@ -38,47 +39,7 @@ openapi-generate-schema:

.PHONY: openapi-generate-java-classes
openapi-generate-java-classes:
# TODO: Do for all modules once they've all been migrated
# cd kubernetes-model-generator && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-common && mvn clean install
cd kubernetes-model-generator/openapi/maven-plugin && mvn clean verify
cd kubernetes-model-generator/kubernetes-model-core && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-rbac && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-admissionregistration && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-apiextensions && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-apps && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-autoscaling && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-batch && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-certificates && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-coordination && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-discovery && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-events && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-extensions && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-flowcontrol && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-gatewayapi && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-networking && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-metrics && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-node && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-policy && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-scheduling && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-storageclass && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-resource && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-kustomize && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-config && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-operator && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-miscellaneous && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-operatorhub && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-console && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-autoscaling && mvn -Pgenerate clean install
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
cd kubernetes-model-generator/openshift-model-whereabouts && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-storageversionmigrator && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-hive && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-installer && mvn -Pgenerate clean install
cd kubernetes-model-generator && mvn $(MAVEN_OPTIONS) -Pgenerate clean install

# Legacy generation of the model: TODO: remove
.PHONY: generate-model-legacy
Expand All @@ -91,3 +52,15 @@ generate-model: openapi-generate-schema openapi-generate-java-classes generate-m
.PHONY: sonar
sonar:
mvn $(MAVEN_OPTIONS) clean install sonar:sonar -Psonar

.PHONY: format-license
format-license:
mvn $(MAVEN_OPTIONS) -N license:format

.PHONY: format-java
format-java:
mvn $(MAVEN_OPTIONS) spotless:apply -Pitests

.PHONY:
quickly: clean
mvn $(MAVEN_OPTIONS) install -DskipTests
45 changes: 10 additions & 35 deletions kubernetes-model-generator/openapi/schemas/openshift-generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -20653,13 +20653,8 @@
"x-kubernetes-list-type": "atomic"
},
"scope": {
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.",
"type": "string",
"enum": [
"*",
"Cluster",
"Namespaced"
]
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".",
"type": "string"
}
},
"x-fabric8-info": {
Expand Down Expand Up @@ -20755,13 +20750,8 @@
"x-kubernetes-list-type": "atomic"
},
"scope": {
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.",
"type": "string",
"enum": [
"*",
"Cluster",
"Namespaced"
]
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".",
"type": "string"
}
},
"x-fabric8-info": {
Expand Down Expand Up @@ -20820,13 +20810,8 @@
"x-kubernetes-list-type": "atomic"
},
"scope": {
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.",
"type": "string",
"enum": [
"*",
"Cluster",
"Namespaced"
]
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".",
"type": "string"
}
},
"x-fabric8-info": {
Expand Down Expand Up @@ -21633,13 +21618,8 @@
"x-kubernetes-list-type": "atomic"
},
"scope": {
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.",
"type": "string",
"enum": [
"*",
"Cluster",
"Namespaced"
]
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".",
"type": "string"
}
},
"x-fabric8-info": {
Expand Down Expand Up @@ -22425,13 +22405,8 @@
"x-kubernetes-list-type": "atomic"
},
"scope": {
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".\n\n\nPossible enum values:\n - `\"*\"` means that all scopes are included.\n - `\"Cluster\"` means that scope is limited to cluster-scoped objects. Namespace objects are cluster-scoped.\n - `\"Namespaced\"` means that scope is limited to namespaced objects.",
"type": "string",
"enum": [
"*",
"Cluster",
"Namespaced"
]
"description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".",
"type": "string"
}
},
"x-fabric8-info": {
Expand Down

0 comments on commit 10c0c10

Please sign in to comment.