Skip to content

Commit

Permalink
NodeDisruptionPolicy cleanups
Browse files Browse the repository at this point in the history
 - don't remove staticpodoperatorstatus for now
 - update godocs to be more clear
 - add a type alias for serviceName
  • Loading branch information
yuqi-zhang committed Mar 21, 2024
1 parent 5574447 commit 5609243
Show file tree
Hide file tree
Showing 12 changed files with 846 additions and 425 deletions.
89 changes: 79 additions & 10 deletions openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 47 additions & 6 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -28762,30 +28762,71 @@
},
"com.github.openshift.api.operator.v1.MachineConfigurationStatus": {
"type": "object",
"required": [
"readyReplicas"
],
"properties": {
"conditions": {
"description": "conditions is a list of conditions and their status",
"type": "array",
"items": {
"default": {},
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition"
"$ref": "#/definitions/com.github.openshift.api.operator.v1.OperatorCondition"
},
"x-kubernetes-list-map-keys": [
"type"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "type",
"x-kubernetes-patch-strategy": "merge"
"x-kubernetes-list-type": "map"
},
"generations": {
"description": "generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.",
"type": "array",
"items": {
"default": {},
"$ref": "#/definitions/com.github.openshift.api.operator.v1.GenerationStatus"
},
"x-kubernetes-list-type": "atomic"
},
"latestAvailableRevision": {
"description": "latestAvailableRevision is the deploymentID of the most recent deployment",
"type": "integer",
"format": "int32"
},
"latestAvailableRevisionReason": {
"description": "latestAvailableRevisionReason describe the detailed reason for the most recent deployment",
"type": "string"
},
"nodeDisruptionPolicyStatus": {
"description": "nodeDisruptionPolicyStatus status reflects what the latest cluster-validated policies are, and will be used by the Machine Config Daemon during future node updates.",
"default": {},
"$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatus"
},
"nodeStatuses": {
"description": "nodeStatuses track the deployment values and errors across individual nodes",
"type": "array",
"items": {
"default": {},
"$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeStatus"
},
"x-kubernetes-list-map-keys": [
"nodeName"
],
"x-kubernetes-list-type": "map"
},
"observedGeneration": {
"description": "observedGeneration is the last generation change you've dealt with",
"type": "integer",
"format": "int64"
},
"readyReplicas": {
"description": "readyReplicas indicates how many replicas are ready and at the desired state",
"type": "integer",
"format": "int32",
"default": 0
},
"version": {
"description": "version is the level this availability applies to",
"type": "string"
}
}
},
Expand Down Expand Up @@ -29313,7 +29354,7 @@
"x-kubernetes-list-type": "atomic"
},
"path": {
"description": "path is the location of the file being managed through a MachineConfig. Actions specified will be applied when changes to the file at the path configured in this field.",
"description": "path is the location of a file being managed through a MachineConfig. The Actions in the policy will apply to changes to the file at this path.",
"type": "string",
"default": ""
}
Expand Down Expand Up @@ -29419,7 +29460,7 @@
"x-kubernetes-list-type": "atomic"
},
"path": {
"description": "path is the location of the file being managed through a MachineConfig. Actions specified will be applied when changes to the file at the path configured in this field.",
"description": "path is the location of a file being managed through a MachineConfig. The Actions in the policy will apply to changes to the file at this path.",
"type": "string",
"default": ""
}
Expand Down
4 changes: 2 additions & 2 deletions operator/v1/techpreview.machineconfiguration.testsuite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ tests:
actions:
- type: DaemonReload
- type: Reload
expectedError: "Reload is required when type is reload, and forbidden otherwise"
expectedError: "reload is required when type is Reload, and forbidden otherwise"
- name: Node disruption policies that specify a reboot action should not allow other actions in the list
initial: |
apiVersion: operator.openshift.io/v1
Expand Down Expand Up @@ -323,4 +323,4 @@ tests:
- type: Drain
- type: Restart
restart:
serviceName: a.b.c.d.e.snapshot
serviceName: a.b.c.d.e.snapshot
Loading

0 comments on commit 5609243

Please sign in to comment.