Skip to content

Commit

Permalink
OCM-3852 | feat: Exposed KubeletConfig endpoints and models for day 2…
Browse files Browse the repository at this point in the history
… operations of setting PIDs limits
  • Loading branch information
robpblake committed Nov 2, 2023
1 parent 5c3f8b7 commit 9e19b5f
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
4 changes: 4 additions & 0 deletions model/clusters_mgmt/v1/cluster_resource.model
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,8 @@ resource Cluster {
locator Vpc {
target Vpc
}

locator KubeletConfig {
target KubeletConfig
}
}
3 changes: 3 additions & 0 deletions model/clusters_mgmt/v1/cluster_type.model
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,7 @@ class Cluster {

// Details for `htpasswd` identity provider.
Htpasswd HTPasswdIdentityProvider

// Details of cluster-wide KubeletConfig
KubeletConfig KubeletConfig
}
38 changes: 38 additions & 0 deletions model/clusters_mgmt/v1/kubeletconfig_resource.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Copyright (c) 2023 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.
*/

// Manages global KubeletConfig configuration for worker nodes in a cluster.
resource KubeletConfig {
// Retrieves the KubeletConfig for a cluster
method Get {
out Body KubeletConfig
}

// Creates a new cluster KubeletConfig
method Post {
in Request KubeletConfig
out Body KubeletConfig
}

// Updates the existing cluster KubeletConfig
method Update {
in out Body KubeletConfig
}

// Deletes the cluster KubeletConfig
method Delete {
}
}
23 changes: 23 additions & 0 deletions model/clusters_mgmt/v1/kubeletconfig_type.model
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright (c) 2023 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.
*/

// OCM representation of KubeletConfig, exposing the fields of Kubernetes
// KubeletConfig that can be managed by users
class KubeletConfig {
// Allows user to specify the podPidsLimit to be applied via KubeletConfig.
// Useful if workloads have greater PIDs limit requirements than the OCP default.
PodPidsLimit Integer
}

0 comments on commit 9e19b5f

Please sign in to comment.