-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:cncf/cnf-conformance into develop
- Loading branch information
Showing
36 changed files
with
1,285 additions
and
8 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
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
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
# OWNERS file for Kubernetes | ||
OWNERS |
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,19 @@ | ||
apiVersion: v1 | ||
appVersion: 5.12.35 | ||
description: Ubiquiti Network's Unifi Controller | ||
home: https://github.com/jacobalberty/unifi-docker | ||
icon: https://blog.ubnt.com/wp-content/uploads/2016/10/unifi-app-logo.png | ||
keywords: | ||
- ubiquiti | ||
- unifi | ||
- mongodb | ||
maintainers: | ||
- email: jeff@billimek.com | ||
name: billimek | ||
- email: mike@quadra-tec.net | ||
name: mcronce | ||
name: unifi | ||
sources: | ||
- https://github.com/jacobalberty/unifi-docker | ||
- https://github.com/helm/charts/tree/master/stable/unifi | ||
version: 0.7.0 |
Large diffs are not rendered by default.
Oops, something went wrong.
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,19 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range .Values.ingress.hosts }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .Values.guiService.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "unifi.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
{{- else if contains "LoadBalancer" .Values.guiService.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "unifi.fullname" . }}-gui' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "unifi.fullname" . }}-gui -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
echo http://$SERVICE_IP:{{ .Values.guiService.port }} | ||
{{- else if contains "ClusterIP" .Values.guiService.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "unifi.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8443:{.Values.guiService.port} | ||
Visit https://127.0.0.1:8443 to use your application | ||
{{- 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,32 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "unifi.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 "unifi.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 "unifi.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
39 changes: 39 additions & 0 deletions
39
sample-cnfs/sample_nodeport/chart/templates/captive-ingress.yaml
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,39 @@ | ||
{{- if (and .Values.captivePortalService.ingress.enabled (not .Values.unifiedService.enabled)) }} | ||
{{- $fullName := include "unifi.fullname" . -}} | ||
{{- $ingressPath := .Values.captivePortalService.ingress.path -}} | ||
{{- $unifiedServiceEnabled := .Values.unifiedService.enabled -}} | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }}-captive | ||
labels: | ||
app.kubernetes.io/name: {{ include "unifi.name" . }} | ||
helm.sh/chart: {{ include "unifi.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- with .Values.captivePortalService.ingress.annotations }} | ||
annotations: | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.captivePortalService.ingress.tls }} | ||
tls: | ||
{{- range .Values.captivePortalService.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.captivePortalService.ingress.hosts }} | ||
- host: {{ . }} | ||
http: | ||
paths: | ||
- path: {{ $ingressPath }} | ||
backend: | ||
serviceName: {{ $fullName }}-captiveportalservice | ||
servicePort: captive-http | ||
{{- end }} | ||
{{- end }} |
61 changes: 61 additions & 0 deletions
61
sample-cnfs/sample_nodeport/chart/templates/captive-svc.yaml
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,61 @@ | ||
{{ if (and .Values.captivePortalService.enabled (not .Values.unifiedService.enabled)) }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "unifi.fullname" . }}-captiveportalservice | ||
labels: | ||
app.kubernetes.io/name: {{ include "unifi.name" . }} | ||
helm.sh/chart: {{ include "unifi.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- if .Values.captivePortalService.labels }} | ||
{{ toYaml .Values.captivePortalService.labels | indent 4 }} | ||
{{- end }} | ||
{{- with .Values.captivePortalService.annotations }} | ||
annotations: | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if (or (eq .Values.captivePortalService.type "ClusterIP") (empty .Values.captivePortalService.type)) }} | ||
type: ClusterIP | ||
{{- if .Values.captivePortalService.clusterIP }} | ||
clusterIP: {{ .Values.captivePortalService.clusterIP }} | ||
{{end}} | ||
{{- else if eq .Values.captivePortalService.type "LoadBalancer" }} | ||
type: {{ .Values.captivePortalService.type }} | ||
{{- if .Values.captivePortalService.loadBalancerIP }} | ||
loadBalancerIP: {{ .Values.captivePortalService.loadBalancerIP }} | ||
{{- end }} | ||
{{- if .Values.captivePortalService.loadBalancerSourceRanges }} | ||
loadBalancerSourceRanges: | ||
{{ toYaml .Values.captivePortalService.loadBalancerSourceRanges | indent 4 }} | ||
{{- end -}} | ||
{{- else }} | ||
type: {{ .Values.captivePortalService.type }} | ||
{{- end }} | ||
{{- if .Values.captivePortalService.externalIPs }} | ||
externalIPs: | ||
{{ toYaml .Values.captivePortalService.externalIPs | indent 4 }} | ||
{{- end }} | ||
{{- if .Values.captivePortalService.externalTrafficPolicy }} | ||
externalTrafficPolicy: {{ .Values.captivePortalService.externalTrafficPolicy }} | ||
{{- end }} | ||
ports: | ||
- port: {{ .Values.captivePortalService.http }} | ||
targetPort: captive-http | ||
protocol: TCP | ||
name: captive-http | ||
{{ if (and (eq .Values.captivePortalService.type "NodePort") (not (empty .Values.captivePortalService.http))) }} | ||
nodePort: {{.Values.captivePortalService.http}} | ||
{{ end }} | ||
- port: {{ .Values.captivePortalService.https }} | ||
targetPort: captive-https | ||
protocol: TCP | ||
name: captive-https | ||
{{ if (and (eq .Values.captivePortalService.type "NodePort") (not (empty .Values.captivePortalService.https))) }} | ||
nodePort: {{.Values.captivePortalService.https}} | ||
{{ end }} | ||
selector: | ||
app.kubernetes.io/name: {{ include "unifi.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{ end }} |
13 changes: 13 additions & 0 deletions
13
sample-cnfs/sample_nodeport/chart/templates/configmap.yaml
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,13 @@ | ||
{{- if .Values.extraConfigFiles }} | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ template "unifi.fullname" . }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "unifi.name" . }} | ||
helm.sh/chart: {{ include "unifi.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
data: | ||
{{ toYaml .Values.extraConfigFiles | indent 2 }} | ||
{{- end }} |
54 changes: 54 additions & 0 deletions
54
sample-cnfs/sample_nodeport/chart/templates/controller-svc.yaml
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,54 @@ | ||
{{ if not .Values.unifiedService.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "unifi.fullname" . }}-controller | ||
labels: | ||
app.kubernetes.io/name: {{ include "unifi.name" . }} | ||
helm.sh/chart: {{ include "unifi.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- if .Values.controllerService.labels }} | ||
{{ toYaml .Values.controllerService.labels | indent 4 }} | ||
{{- end }} | ||
{{- with .Values.controllerService.annotations }} | ||
annotations: | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if (or (eq .Values.controllerService.type "ClusterIP") (empty .Values.controllerService.type)) }} | ||
type: ClusterIP | ||
{{- if .Values.controllerService.clusterIP }} | ||
clusterIP: {{ .Values.controllerService.clusterIP }} | ||
{{end}} | ||
{{- else if eq .Values.controllerService.type "LoadBalancer" }} | ||
type: {{ .Values.controllerService.type }} | ||
{{- if .Values.controllerService.loadBalancerIP }} | ||
loadBalancerIP: {{ .Values.controllerService.loadBalancerIP }} | ||
{{- end }} | ||
{{- if .Values.controllerService.loadBalancerSourceRanges }} | ||
loadBalancerSourceRanges: | ||
{{ toYaml .Values.controllerService.loadBalancerSourceRanges | indent 4 }} | ||
{{- end -}} | ||
{{- else }} | ||
type: {{ .Values.controllerService.type }} | ||
{{- end }} | ||
{{- if .Values.controllerService.externalIPs }} | ||
externalIPs: | ||
{{ toYaml .Values.controllerService.externalIPs | indent 4 }} | ||
{{- end }} | ||
{{- if .Values.controllerService.externalTrafficPolicy }} | ||
externalTrafficPolicy: {{ .Values.controllerService.externalTrafficPolicy }} | ||
{{- end }} | ||
ports: | ||
- port: {{ .Values.controllerService.port }} | ||
targetPort: controller | ||
protocol: TCP | ||
name: controller | ||
{{ if (and (eq .Values.controllerService.type "NodePort") (not (empty .Values.controllerService.nodePort))) }} | ||
nodePort: {{.Values.controllerService.nodePort}} | ||
{{ end }} | ||
selector: | ||
app.kubernetes.io/name: {{ include "unifi.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{ end }} |
Oops, something went wrong.