Code Monkey home page Code Monkey logo

agicsanitycheck's Introduction

Overview

This policy performs the following

  • Denys the creation of ingress object if the come with a specific set of annotation. the annotations are configurable. For example. this is taken from the azure policy defintions
    • "defaultValue": [ "appgw.ingress.kubernetes.io/waf-policy-for-path", "forbiddenexample" ]
  • its applied the Ingress objects.
  • its applied to ingress objects with either of the following configs
    • ingressClassName == "azure-application-gateway"
    • Annotation: "kubernetes.io/ingress.class":"azure/application-gateway
    • any ingress without out these settings are ignored

install GK

Note: Testing on the OSS version of GK is the most efficent way of developing policy definitions. If deploying on Azure with Azure policy. Azure policy will autom generate the Constraint definition. in the OSS version we define it.

helm repo add gatekeeper https://open-policy-agent.github.io/gatekeeper/charts
helm install gatekeeper/gatekeeper --name-template=gatekeeper --namespace gatekeeper-system --create-namespace 

To test on OSS GK

Deploy to Azure policy

  • go to any policy definition in Azure, and duplicate
  • replace contents in editior with contents of azurepolicy
  • Apply the policy to a k8s scope

Result

The expected result

agicsanitycheck's People

Watchers

Ivan Mc Kinley avatar

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.