From 3af0df3b3c210e2b63d5533ff1ff378e88f8a464 Mon Sep 17 00:00:00 2001 From: Colton Gerke Date: Mon, 2 Dec 2024 13:03:33 -0600 Subject: [PATCH] Documentation updates --- CONTRIBUTING.md | 1 + README.md | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 011d9e552..cc6808dd3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -91,6 +91,7 @@ This gem uses subclasses of `KubernetesResource` to implement custom success/fai 1. Create a file for your type in `lib/krane/kubernetes_resource/` 2. Create a new class that inherits from `KubernetesResource`. Minimally, it should implement the following methods: * `sync` -- Gather the data you'll need to determine `deploy_succeeded?` and `deploy_failed?`. The superclass's implementation fetches the corresponding resource, parses it and stores it in `@instance_data`. You can define your own implementation if you need something else. + * `predeployed?` -- Whether the resource should be [predeployed](README.md#phase-3-predeploying-priority-resources) by default. * `deploy_succeeded?` * `deploy_failed?` 3. Adjust the `TIMEOUT` constant to an appropriate value for this type. diff --git a/README.md b/README.md index 88322a343..1e6835e2b 100644 --- a/README.md +++ b/README.md @@ -166,11 +166,11 @@ before the deployment is considered successful. - Percent (e.g. 90%): The deploy is successful when the number of new pods that are ready is equal to `spec.replicas` * Percent. - _Compatibility_: StatefulSet - `full`: The deployment is successful when all pods are ready. -- `krane.shopify.io/predeployed`: Causes a Custom Resource, Deployment, Service, Job, or Ingress to be deployed in the pre-deploy phase. - - _Compatibility_: Custom Resource Definition, Deployment, Service, Job, Ingress - - _Default_: `true` - - `true`: The custom resource, deployment, service, job, or ingress will be deployed in the pre-deploy phase. - - All other values: The custom resource, deployment, service, job, or ingress will be deployed in the main deployment phase. +- `krane.shopify.io/predeployed`: Causes a Custom Resource or [other resources](https://github.com/powerhome/krane/tree/main/lib/krane/kubernetes_resource) to be deployed in the pre-deploy phase. + - _Compatibility_: CronJob, CustomResource, CustomResourceDefinition, DaemonSet, Deployment, HorizontalPodAutoscaler, Ingress, Job, Pod, PodDisruptionBudget, PodSetBase, PodTemplate, ReplicaSet, Service, StatefulSet + - _Default_: `false` + - `true`: The custom resource or other resource will be deployed in the pre-deploy phase. + - All other values: The custom resource or other resource will be deployed in the main deployment phase. - `krane.shopify.io/deploy-method-override`: Cause a resource to be deployed by the specified `kubectl` command, instead of the default `apply`. - _Compatibility_: Cannot be used for `PodDisruptionBudget`, since it always uses `create/replace-force` - _Accepted values_: `create`, `replace`, and `replace-force`