-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: support to deploy ingress-apisix through helm charts
- Loading branch information
Showing
20 changed files
with
857 additions
and
3 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
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 | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,27 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
apiVersion: v2 | ||
name: base | ||
description: Helm chart for deploying ingress-apisix cluster resources and CRDs | ||
icon: https://apache.org/logos/res/apisix/apisix.png | ||
keywords: | ||
- ingress | ||
- apisix | ||
- nginx | ||
type: application | ||
version: 0.1.0 | ||
appVersion: 1.16.0 |
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,88 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: apisixroutes.apisix.apache.org | ||
spec: | ||
group: apisix.apache.org | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
scope: Namespaced | ||
names: | ||
plural: apisixroutes | ||
singular: apisixroute | ||
kind: ApisixRoute | ||
shortNames: | ||
- ar | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: apisixtlses.apisix.apache.org | ||
spec: | ||
group: apisix.apache.org | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
scope: Namespaced | ||
names: | ||
plural: apisixtlses | ||
singular: apisixtls | ||
kind: ApisixTls | ||
shortNames: | ||
- atls | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: apisixupstreams.apisix.apache.org | ||
spec: | ||
group: apisix.apache.org | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
scope: Namespaced | ||
names: | ||
plural: apisixupstreams | ||
singular: apisixupstream | ||
kind: ApisixUpstream | ||
shortNames: | ||
- au | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: apisixservices.apisix.apache.org | ||
spec: | ||
group: apisix.apache.org | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
scope: Namespaced | ||
names: | ||
plural: apisixservices | ||
singular: apisixservice | ||
kind: ApisixService | ||
shortNames: | ||
- as |
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 @@ | ||
Installs ingress-apisix cluster resources: CRDs, cluster bindings and associated service accounts. |
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,51 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "base.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 "base.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 "base.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "base.labels" -}} | ||
helm.sh/chart: {{ include "base.chart" . }} | ||
{{ include "base.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "base.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "base.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- 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,179 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.rbac.serviceAccount }} | ||
labels: | ||
{{- include "base.labels" . | nindent 4 }} | ||
{{- with .Values.rbac.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ .Values.rbac.clusterRole }} | ||
labels: | ||
{{- include "base.labels" . | nindent 4 }} | ||
{{- with .Values.rbac.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
- endpoints | ||
- persistentvolumeclaims | ||
- pods | ||
- replicationcontrollers | ||
- replicationcontrollers/scale | ||
- serviceaccounts | ||
- services | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- bindings | ||
- events | ||
- limitranges | ||
- namespaces/status | ||
- pods/log | ||
- pods/status | ||
- replicationcontrollers/status | ||
- resourcequotas | ||
- resourcequotas/status | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- namespaces | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- controllerrevisions | ||
- daemonsets | ||
- deployments | ||
- deployments/scale | ||
- replicasets | ||
- replicasets/scale | ||
- statefulsets | ||
- statefulsets/scale | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- autoscaling | ||
resources: | ||
- horizontalpodautoscalers | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- batch | ||
resources: | ||
- cronjobs | ||
- jobs | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- extensions | ||
resources: | ||
- daemonsets | ||
- deployments | ||
- deployments/scale | ||
- ingresses | ||
- networkpolicies | ||
- replicasets | ||
- replicasets/scale | ||
- replicationcontrollers/scale | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- policy | ||
resources: | ||
- poddisruptionbudgets | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- networking.k8s.io | ||
resources: | ||
- ingresses | ||
- networkpolicies | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- metrics.k8s.io | ||
resources: | ||
- pods | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- apisix.apache.org | ||
resources: | ||
- apisixroutes | ||
- apisixupstreams | ||
- apisixservices | ||
- apisixtlses | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ .Values.rbac.clusterRoleBinding }} | ||
labels: | ||
{{- include "base.labels" . | nindent 4 }} | ||
{{- with .Values.rbac.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ .Values.rbac.clusterRole }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Values.rbac.serviceAccount }} | ||
namespace: {{ .Release.Namespace }} |
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,21 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
rbac: | ||
serviceAccount: "apisix-view-serviceaccount" | ||
clusterRole: "apisix-view-clusterrole" | ||
clusterRoleBinding: "apisix-view-clusterrolebinding" | ||
annotations: {} |
Oops, something went wrong.