-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add two feature gates : Image based deployment and additional runtimeClasses #394
Commits on Apr 23, 2024
-
Move featuregates to separate package
Additionally include the following changes: 1. Include separate logger for the package 2. Switch to a status map to keep track of FeatureGate status. This enables tracking multiple feature gates in the reconcile loop and avoid calling the Kube API for individual feature gates Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 27a7e94 - Browse repository at this point
Copy the full SHA 27a7e94View commit details
Commits on Apr 25, 2024
-
Add method to check for feature cm
Queries the K8s api to check if feature configmap is present or not Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b6bacc1 - Browse repository at this point
Copy the full SHA b6bacc1View commit details
Commits on Apr 29, 2024
-
Add support for layered image based deployment
OpenShift supports image layering, that allows deployment of packages by providing a custom RHCOS image. You need to create a MachineConfig with the custom RHCOS image url and that's about it. This commit adds support for using custom RHCOS image url to deploy Kata components as an alternative to using the extension mechanism. This capability is behind a feature gate and you'll need to set LayeredImageDeployment to true in osc-feature-gates ConfigMap. Additionally you'll need to set additional config params like shown below for the layeredimagedeployment-config configmap: apiVersion: v1 kind: ConfigMap metadata: name: osc-feature-gates namespace: openshift-sandboxed-containers-operator data: LayeredImageDeployment: "true" --- apiVersion: v1 kind: ConfigMap metadata: name: layeredimagedeployment-config namespace: openshift-sandboxed-containers-operator data: osImageURL: "quay.io/...." kernelArguments: "a=b c=d ..." Logs an error and reconcile if LayeredImageDeployment feature is enabled and configmap is not provided Fixes: #KATA-2902 Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2559ba0 - Browse repository at this point
Copy the full SHA 2559ba0View commit details -
Add separate event handler for configmap updates
With the previous code of predicate func, the reconcile loop was not receiving the KataConfig struct. Instead the reconcile loop was called with the OSC featuregate configmap struct. The new method ensures that for featuregate configMap changes, the reconcile loop is called with the KataConfig struct. Fixes: #KATA-2902, #KATA-2903 Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c4de12f - Browse repository at this point
Copy the full SHA c4de12fView commit details -
Allow multiple runtimeClass creation
Modify createRuntimeClass function to createRuntimeClasses This lays the foundation to support different runtimeClasses for CoCo like kata-cc-tdx, kata-cc-snp, kata-cc-remote etc. Fixes: #KATA-2903 Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c69ccba - Browse repository at this point
Copy the full SHA c69ccbaView commit details -
Add feature for creating additional runtimeClasses
This is enabled via AdditionalRuntimeClasses feature gate. Example configuration is shown below: apiVersion: v1 kind: ConfigMap metadata: name: osc-feature-gates namespace: openshift-sandboxed-containers-operator data: AdditionalRuntimeClasses: "true" --- apiVersion: v1 kind: ConfigMap metadata: name: additionalruntimeclasses-config namespace: openshift-sandboxed-containers-operator data: runtimeClassConfig: "name1:cpuOverHead1:memOverHead1, name2:cpuOverHead2:memOverHead2" #runtimeClassConfig: "name1, name2" Also rearrange the code to have all the runtimeClass handling in a single code file for easier readability This feature typically will be used with other features. For example this feature can be used with the image based deployment feature as well. The image based deployment might have configuration for multiple runtimeclasses which is then exposed to users as RuntimeClass objects created by OSC operator when this feature gate is enabled. Logs an error if AdditionalRuntimeClasses feature is enabled and config is not provided Fixes: #KATA-2903 Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1fc86ae - Browse repository at this point
Copy the full SHA 1fc86aeView commit details -
Update featuregate sample yaml
Add examples for LayeredImageDeployment and AdditionalRuntimeClasses feature Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 36272dc - Browse repository at this point
Copy the full SHA 36272dcView commit details -
IsEnabled method is no longer needed. Hence removing it Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d1eea4b - Browse repository at this point
Copy the full SHA d1eea4bView commit details -
Rename DefaultFeatureGates to DefaultFeatureGatesStatus
This aligns with its usage Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for fb547fe - Browse repository at this point
Copy the full SHA fb547feView commit details -
Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0e53603 - Browse repository at this point
Copy the full SHA 0e53603View commit details -
Create featuregate status configmap at start
Featuregate status configmap is initialised by the operator itself. Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6c004fd - Browse repository at this point
Copy the full SHA 6c004fdView commit details -
Handle missing featuregate status configmap
Check for featuregate status configmap in the beginning of the reconcile loop and don't proceed if it's missing This ensures we don't take any action if we cannot determine the FeatureGateStatus which could be due to an error in fetching the ConfigMap or the ConfigMap not being present Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9e96e8d - Browse repository at this point
Copy the full SHA 9e96e8dView commit details -
Remove duplicate code for reading yamls
We had different methods to read yaml files depending on the kubernetes object. However this is really not needed as all the methods simply were reading files with the only difference being the flie location. This commit simplifies the code and uses a single readYamlFile method. The caller should set the full path of the yaml file to be read. Further any additional requirements to read different yaml files will no longer need a new method Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c59f99b - Browse repository at this point
Copy the full SHA c59f99bView commit details -
Rename FeatureGatesConfigMapName to FeatureGatesStatusConfigMapName
This avoids confusion with the individual feature gate configmap and also correctly reflects the intent of the variable Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 27599db - Browse repository at this point
Copy the full SHA 27599dbView commit details -
Revert fg status configmap to default on KataConfig deletion
Since fg status configmap is must and created during operator initialisation, we need to ensure on KataConfig deletion it's reverted back to default values. Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9a30d74 - Browse repository at this point
Copy the full SHA 9a30d74View commit details -
Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5f47dc5 - Browse repository at this point
Copy the full SHA 5f47dc5View commit details