Skip to content

Commit

Permalink
Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
c-gerke committed Dec 2, 2024
1 parent 2f88b93 commit 3af0df3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 3af0df3

Please sign in to comment.