-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release FortiWebIngressController: 2.0.1
Signed-off-by: FTNT-HQCM <[email protected]>
- Loading branch information
Showing
18 changed files
with
331 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v2 | ||
name: fwb-k8s-ctrl | ||
version: 2.0.1 | ||
kubeVersion: ">= 1.19.8-0, <= 1.30-0" | ||
description: A Helm chart for FortiWeb Ingress Controller | ||
type: application | ||
appVersion: "2.0.1" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "fwb-k8s-ctrl.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "fwb-k8s-ctrl.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "fwb-k8s-ctrl.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "fwb-k8s-ctrl.labels" -}} | ||
helm.sh/chart: {{ include "fwb-k8s-ctrl.chart" . }} | ||
{{ include "fwb-k8s-ctrl.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "fwb-k8s-ctrl.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "fwb-k8s-ctrl.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "fwb-k8s-ctrl.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "fwb-k8s-ctrl.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "fwb-k8s-ctrl.fullname" . }} | ||
labels: | ||
{{- include "fwb-k8s-ctrl.labels" . | nindent 4 }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
{{- include "fwb-k8s-ctrl.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "fwb-k8s-ctrl.selectorLabels" . | nindent 8 }} | ||
spec: | ||
serviceAccountName: {{ .Values.serviceAccount.name }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
|
||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- if .Values.controller.ingressClassResource.enabled -}} | ||
# We don't support namespaced ingressClass yet | ||
# So a ClusterRole and a ClusterRoleBinding is required | ||
apiVersion: networking.k8s.io/v1 | ||
kind: IngressClass | ||
metadata: | ||
name: {{ .Values.controller.ingressClassResource.name }} | ||
{{- if .Values.controller.ingressClassResource.default }} | ||
annotations: | ||
ingressclass.kubernetes.io/is-default-class: "true" | ||
{{- end }} | ||
spec: | ||
controller: {{ .Values.controller.ingressClassResource.controllerValue }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: {{ include "fwb-k8s-ctrl.serviceAccountName" . }} | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods", "services", "nodes", "endpoints", "secrets"] | ||
verbs: ["get", "watch", "list", "update"] | ||
- apiGroups: | ||
- networking.k8s.io | ||
resources: | ||
- ingresses | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- networking.k8s.io | ||
resources: | ||
- ingressclasses | ||
verbs: | ||
- get | ||
- list | ||
- apiGroups: | ||
- networking.k8s.io | ||
resources: | ||
- ingresses/status | ||
verbs: | ||
- update | ||
- apiGroups: | ||
- extensions | ||
resources: | ||
- ingresses/status | ||
verbs: | ||
- update | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: {{ include "fwb-k8s-ctrl.serviceAccountName" . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "fwb-k8s-ctrl.serviceAccountName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ include "fwb-k8s-ctrl.serviceAccountName" . }} | ||
apiGroup: rbac.authorization.k8s.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "fwb-k8s-ctrl.serviceAccountName" . }} | ||
#namespace: kube-system | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "fwb-k8s-ctrl.labels" . | nindent 4 }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Default values for fwb-k8s-ctrl. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
# FortiWEB Ingress Controller image from Dockerhub.com | ||
image: | ||
repository: fortinet/fortiweb-ingress | ||
pullPolicy: IfNotPresent | ||
tag: "2.0.1" | ||
|
||
nameOverride: "" | ||
fullnameOverride: "" | ||
|
||
serviceAccount: | ||
create: true | ||
annotations: {} | ||
name: "fortiweb-ingress" | ||
|
||
podAnnotations: {} | ||
|
||
podSecurityContext: {} | ||
|
||
securityContext: {} | ||
# capabilities: | ||
# drop: | ||
# - ALL | ||
# readOnlyRootFilesystem: true | ||
# runAsNonRoot: true | ||
# runAsUser: 1000 | ||
|
||
nodeSelector: {} | ||
|
||
tolerations: | ||
- effect: "NoExecute" | ||
key: "node.kubernetes.io/not-ready" | ||
operator: "Exists" | ||
tolerationSeconds: 30 | ||
- effect: "NoExecute" | ||
key: "node.kubernetes.io/unreachable" | ||
operator: "Exists" | ||
tolerationSeconds: 30 | ||
|
||
affinity: {} | ||
|
||
# Define Ingress Class for FortiWEB Ingress Controller | ||
controller: | ||
ingressClassResource: | ||
name: "fwb-ingress-controller" | ||
enabled: true | ||
default: true | ||
controllerValue: "fortinet.com/fwb-ingress-controller" |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: cr-with-web-profile | ||
annotations: { | ||
"fortiweb-ip" : "172.23.133.148", | ||
"fortiweb-port" : "443", | ||
"fortiweb-login" : "fad-login1", | ||
"fortiweb-ctrl-log" : "enable", | ||
"virtual-server-ip" : "192.168.0.9", | ||
"virtual-server-addr-type" : "ipv4", | ||
"virtual-server-interface" : "port3", | ||
"virtual_server_profile" : "just_a_test", | ||
"server-policy-web-protection-profile" : "Inline Standard Protection", | ||
"server-policy-https-service" : "HTTPS", | ||
"server-policy-http-service" : "HTTP", | ||
"server-policy-syn-cookie" : "enable", | ||
"server-policy-http-to-https" : "disable", | ||
"content-routing-web-protect-profile" : "test.com_service1:Inline Alert Only,test.com_service2:Inline Alert Only" | ||
} | ||
spec: | ||
ingressClassName: fwb-ingress-controller | ||
rules: | ||
- host: test.com | ||
http: | ||
paths: | ||
- path: /info | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: service2 | ||
port: | ||
number: 1243 | ||
- path: /test | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: service1 | ||
port: | ||
number: 1241 | ||
|
Oops, something went wrong.