Bylaw

Gallery › Kubernetes service › Azure built-in policies

[Deprecated]: Enforce unique ingress hostnames across namespaces in AKS

Doesn't convert yet Policy Disabled Mode Microsoft.ContainerService.Data Version 1.0.1-deprecated Deprecated

This policy enforces unique ingress hostnames across namespaces in an Azure Kubernetes Service cluster. This policy is deprecated, please visit https://aka.ms/kubepolicydoc for instructions on using new Kubernetes policies.

ConvertTo-Bylaw can't convert this policy yet:

Azure Policy JSONIngressHostnamesConflict_EnforceRegoPolicy.json · 46 lines
{
  "properties": {
    "displayName": "[Deprecated]: Enforce unique ingress hostnames across namespaces in AKS",
    "policyType": "BuiltIn",
    "mode": "Microsoft.ContainerService.Data",
    "description": "This policy enforces unique ingress hostnames across namespaces in an Azure Kubernetes Service cluster. This policy is deprecated, please visit https://aka.ms/kubepolicydoc for instructions on using new Kubernetes policies.",
    "metadata": {
      "version": "1.0.1-deprecated",
      "category": "Kubernetes service",
      "deprecated": true
    },
    "version": "1.0.1",
    "parameters": {
      "effect": {
        "type": "String",
        "defaultValue": "EnforceRegoPolicy",
        "allowedValues": [
          "EnforceRegoPolicy",
          "Disabled"
        ],
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        }
      }
    },
    "policyRule": {
      "if": {
        "field": "type",
        "equals": "Microsoft.ContainerService/managedClusters"
      },
      "then": {
        "effect": "[parameters('effect')]",
        "details": {
          "policyId": "UniqueIngressHostnames",
          "policy": "https://raw.githubusercontent.com/Azure/azure-policy/master/built-in-references/KubernetesService/ingress-hostnames-conflict/limited-preview/gatekeeperpolicy.rego"
        }
      }
    },
    "versions": [
      "1.0.1"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/d011d9f7-ba32-4005-b727-b3d09371ca60",
  "name": "d011d9f7-ba32-4005-b727-b3d09371ca60"
}

Source: built-in-policies/policyDefinitions/Kubernetes service/IngressHostnamesConflict_EnforceRegoPolicy.json in Azure/azure-policy, under the MIT licence.