Giter Site home page Giter Site logo

openixia / kube-bro-configmaptemplate Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 3.57 MB

An implementation of ConfigMapTemplate in support of running Bro under Kubernetes. https://www.ixiacom.com/company/blog/threat-hunting-%C2%A0scale-part-one-series

License: Apache License 2.0

Dockerfile 0.36% Go 96.61% Shell 3.03%
threat-hunting kubernetes kubernetes-controller templates configmap intrusion-detection-system

kube-bro-configmaptemplate's Introduction

kube-bro-configmaptemplate

This repository implements a simple controller for watching ConfigMapTemplate resources as defined with a CustomResourceDefinition (CRD).

It is largely derived from the sample at https://github.com/kubernetes/sample-controller

It makes use of the generators in k8s.io/code-generator to generate a typed client, informers, listers and deep-copy functions. You can do this yourself using the ./hack/update-codegen.sh script.

The update-codegen script will automatically generate the following files & directories:

  • pkg/apis/cmt/v1alpha1/zz_generated.deepcopy.go
  • pkg/client/

Changes should not be made to these files manually, and when modifying this implementation you should run the update-codegen script to generate new versions.

Running

Prerequisite: Since the sample-controller uses apps/v1 deployments, the Kubernetes cluster version should be greater than 1.9.

# create a CustomResourceDefinition, ClusterRole, ServiceAccount, and
# Deployment that set up in Kubernetes the customresource and the
# controller that makes it work
$ kubectl create -f artifacts/configmaptemplate.yaml

# create a custom resource of type ConfigMapTemplate
$ kubectl create -f artifacts/examples/example-configmap-template.yaml

# check configmaps created through the custom resource
$ kubectl get configmaps

Cleanup

You can clean up the created CustomResourceDefinition with:

$ kubectl delete -f artifacts/configmaptemplate.yaml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.