All Projects → zlabjp → kubernetes-resource

zlabjp / kubernetes-resource

Licence: MIT license
[DEPLICATED] This repository is no longer actively maintained.

Programming Languages

shell
77523 projects
HTML
75241 projects
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to kubernetes-resource

pulumi-resource
Pulumi Resource Type for Concourse
Stars: ✭ 16 (-82.61%)
Mutual labels:  concourse
keyval-resource
a resource that passes key values between jobs
Stars: ✭ 39 (-57.61%)
Mutual labels:  concourse
concourse-slack-notifier
A structured Slack notification resource for Concourse
Stars: ✭ 17 (-81.52%)
Mutual labels:  concourse
concourse-fly-resource
A Concourse resource for manipulating fly
Stars: ✭ 16 (-82.61%)
Mutual labels:  concourse
concourse-ci-formula
All-in-one Concourse VM with S3-compatible storage and Vault secret manager
Stars: ✭ 26 (-71.74%)
Mutual labels:  concourse
gcs-resource
Concourse resource for interacting with Google Cloud Storage
Stars: ✭ 33 (-64.13%)
Mutual labels:  concourse
cf-ops-automation
a collaboration framework for operating cloudfoundry and services at scale
Stars: ✭ 21 (-77.17%)
Mutual labels:  concourse
concourse-git-bitbucket-pr-resource
🚀 Concourse CI resource for tracking git branches of Bitbucket pull-requests
Stars: ✭ 29 (-68.48%)
Mutual labels:  concourse
ofcourse
A Concourse resource generator
Stars: ✭ 41 (-55.43%)
Mutual labels:  concourse
bender
A Concourse resource that can trigger and pass parameters to jobs using slack
Stars: ✭ 32 (-65.22%)
Mutual labels:  concourse
maven-resource
Maven Repository Manager Concourse Resource
Stars: ✭ 22 (-76.09%)
Mutual labels:  concourse
concourse-build-resource
A Concourse resource for observing Concourse builds
Stars: ✭ 16 (-82.61%)
Mutual labels:  concourse
paas-templates
Bosh, CFAR, CFCR and OSB services templates for use with COA (cf-ops-automation) framework
Stars: ✭ 16 (-82.61%)
Mutual labels:  concourse
terraform-provider-concourse
A terraform provider for Concourse
Stars: ✭ 49 (-46.74%)
Mutual labels:  concourse
cogito
Another Concourse GitHub status resource
Stars: ✭ 21 (-77.17%)
Mutual labels:  concourse
ansible-concourse
An ansible role to manage Concourse CI
Stars: ✭ 22 (-76.09%)
Mutual labels:  concourse
terraform-aws-concourse
Terraform Module for a distributed concourse cluster on AWS
Stars: ✭ 12 (-86.96%)
Mutual labels:  concourse
Concourse
Concourse is a container-based continuous thing-doer written in Go.
Stars: ✭ 6,070 (+6497.83%)
Mutual labels:  concourse
oci-build-task
a Concourse task for building OCI images
Stars: ✭ 57 (-38.04%)
Mutual labels:  concourse
cloud-native-pipelines
Cloud-native pipelines leveraging Concourse, Pivotal Build Service and Spinnaker to deploy apps
Stars: ✭ 15 (-83.7%)
Mutual labels:  concourse

kubernetes-resource

Build Status

A Concourse resource for controlling the Kubernetes cluster.

This resource supports AWS EKS. (kubernetes-sigs/[email protected])

Versions

The version of this resource corresponds to the version of kubectl. We recommend using different version depending on the kubernetes version of the cluster.

Source Configuration

kubeconfig

  • kubeconfig: Optional. A kubeconfig file.
    kubeconfig: |
      apiVersion: v1
      clusters:
      - cluster:
        ...
  • context: Optional. The context to use when specifying a kubeconfig or kubeconfig_file

cluster configs

  • server: Optional. The address and port of the API server.
  • token: Optional. Bearer token for authentication to the API server.
  • namespace: Optional. The namespace scope. Defaults to default. If set along with kubeconfig, namespace will override the namespace in the current-context
  • certificate_authority: Optional. A certificate for the certificate authority.
    certificate_authority: |
        -----BEGIN CERTIFICATE-----
        ...
        -----END CERTIFICATE-----
  • certificate_authority_file: Optional. A file to read the certificate from. Only takes effect when certificate_authority_file is not set.
    certificate_authority_file: ca_certs.crt
  • insecure_skip_tls_verify: Optional. If true, the API server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to false.
  • use_aws_iam_authenticator: Optional. If true, the aws_iam_authenticator, required for connecting with EKS, is used. Requires aws_eks_cluster_name. Defaults to false.
  • aws_eks_cluster_name: Optional. the AWS EKS cluster name, required when use_aws_iam_authenticator is true.
  • aws_eks_assume_role: Optional. the AWS IAM role ARN to assume.
  • aws_access_key_id: Optional. AWS access key to use for iam authenticator.
  • aws_secret_access_key: Optional. AWS secret key to use for iam authenticator.
  • aws_session_token: Optional. AWS session token (assumed role) to use for iam authenticator.

Behavior

check: Do nothing.

in: Do nothing.

out: Control the Kubernetes cluster.

Control the Kubernetes cluster like kubectl apply, kubectl delete, kubectl label and so on.

Parameters

  • kubectl: Required. Specify the operation that you want to perform on one or more resources, for example apply, delete, label.
  • context: Optional. The context to use when specifying a kubeconfig or kubeconfig_file
  • wait_until_ready: Optional. The number of seconds that waits until all pods are ready. 0 means don't wait. Defaults to 30.
  • wait_until_ready_interval: Optional. The interval (sec) on which to check whether all pods are ready. Defaults to 3.
  • wait_until_ready_selector: Optional. A label selector to identify a set of pods which to check whether those are ready. Defaults to every pods in the namespace.
  • kubeconfig_file: Optional. The path of kubeconfig file. This param has priority over the kubeconfig of source configuration.
  • namespace: Optional. The namespace scope. It will override the namespace in other params and source configuration.

Example

resource_types:
- name: kubernetes
  type: docker-image
  source:
    repository: zlabjp/kubernetes-resource
    tag: "1.17"

resources:
- name: kubernetes-production
  type: kubernetes
  source:
    server: https://192.168.99.100:8443
    namespace: production
    token: {{kubernetes-production-token}}
    certificate_authority: {{kubernetes-production-cert}}
- name: my-app
  type: git
  source:
    ...

jobs:
- name: kubernetes-deploy-production
  plan:
  - get: my-app
    trigger: true
  - put: kubernetes-production
    params:
      kubectl: apply -f my-app/k8s -f my-app/k8s/production
      wait_until_ready_selector: app=myapp

Force update deployment

jobs:
- name: force-update-deployment
  serial: true
  plan:
  - put: mycluster
    params:
      kubectl: |
        patch deploy nginx -p '{"spec":{"template":{"metadata":{"labels":{"updated_at":"'$(date +%s)'"}}}}}'
      wait_until_ready_selector: run=nginx

Use a remote kubeconfig file fetched by s3-resource

resources:
- name: k8s-prod
  type: kubernetes

- name: kubeconfig-file
  type: s3
  source:
    bucket: mybucket
    versioned_file: config
    access_key_id: ((s3-access-key))
    secret_access_key: ((s3-secret))

- name: my-app
  type: git
  source:
    ...

jobs:
- name: k8s-deploy-prod
  plan:
  - aggregate:
    - get: my-app
      trigger: true
    - get: kubeconfig-file
  - put: k8s-prod
    params:
      kubectl: apply -f my-app/k8s -f my-app/k8s/production
      wait_until_ready_selector: app=myapp
      kubeconfig_file: kubeconfig-file/config

License

This software is released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].