mirror of
https://github.com/danielgormly/drone-plugin-kube.git
synced 2026-06-16 14:49:00 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5afd783cc1 | |||
| cdf38eea63 |
@@ -2,24 +2,14 @@
|
||||
|
||||
[](https://microbadger.com/images/danielgormly/drone-plugin-kube "Get your own version badge on microbadger.com")
|
||||
|
||||
A simple Drone plugin for updating Kubernetes resources from yaml templates. Follows from [vallard/drone-kube](https://github.com/vallard/drone-kube). The plugin will create a plugin if it doesn't already exist.
|
||||
|
||||
This plugin supports deployments, configmaps, ingresses, and services.
|
||||
A simple Drone plugin for updating Kubernetes resources from yaml templates. Follows from [vallard/drone-kube](https://github.com/vallard/drone-kube). The plugin will create a resource if it doesn't already exist i.e. behaves similar to `kubectl apply`. This plugin supports deployments, configmaps, ingresses, and services.
|
||||
|
||||
Usage: See [drone.md](./drone.md)
|
||||
|
||||
## Deployment, service, ingress templates
|
||||
|
||||
Deployment config files are first interpreted by **aymerick/raymond** ([handlebarsjs](http://handlebarsjs.com/) equivalent). You can use all available raymond expressions and anything you put in settings will be made available in your deployment template e.g. `{{namespace}}`. See [example/deployment.template.yaml](/example/deployment.template.yaml) for a complete example.
|
||||
|
||||
## Config maps from files
|
||||
|
||||
In this case, you can create a template just like deployment.yaml but you can provide a file path (relative to the repo's root) in the plugin setting `configmap_file`. (Currently only accepts utf-8 encoded data). Like deployments, this will both create new or update existing configmaps (based on the configmap name).
|
||||
|
||||
#### Adding a service account to Kubernetes that can manage deployments
|
||||
#### Creating a Kubernetes service account for Drone
|
||||
See [example/Role.yaml](example/Role.yaml), [example/ServiceAccount.yaml](example/ServiceAccount.yaml), [example/RoleBinding.yaml](example/RoleBinding.yaml).
|
||||
|
||||
## Notes:
|
||||
## Usage notes:
|
||||
|
||||
- The watching process is not currently reliable i.e. it doesn't properly wait for new deployments to become live. Not entirely sure how this should behave but I think behind a flag would make sense. PRs welcome.
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ func main() {
|
||||
},
|
||||
}
|
||||
fmt.Printf(os.Getenv("PLUGIN_SKIP_TLS"))
|
||||
fmt.Println("danielgormly/drone-plugin-kube@0.0.2 https://github.com/danielgormly/drone-plugin-kube")
|
||||
fmt.Println("danielgormly/drone-plugin-kube@0.1.0 https://github.com/danielgormly/drone-plugin-kube")
|
||||
err := plugin.Exec()
|
||||
if err != nil {
|
||||
log.Fatalf("⛔️ Fatal error: \n%s", err)
|
||||
|
||||
Reference in New Issue
Block a user