forked from kedacore/keda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add chart build to CI script Closes kedacore#23
- Loading branch information
1 parent
d78533a
commit 1eba8eb
Showing
13 changed files
with
249 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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 | ||
.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,11 @@ | ||
apiVersion: v1 | ||
name: kore | ||
description: Event based autoscaler for Azure Functions deployments on Kubernetes | ||
version: 0.0.1 | ||
appVersion: 0.0.1 | ||
home: https://github.com/Azure/Kore | ||
sources: | ||
- https://github.com/Azure/Kore | ||
maintainers: | ||
- name: Ahmed ElSayed | ||
email: [email protected] |
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,54 @@ | ||
{{/* https://github.com/helm/charts/blob/master/stable/kubernetes-dashboard/templates/_helpers.tpl */}} | ||
|
||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "kore.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 DNS naming spec). | ||
If release name contains chart name it will be used as a full name | ||
*/}} | ||
{{- define "kore.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 "kore.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "kore.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create -}} | ||
{{default (include "kore.fullname" .) .Values.serviceAccount.name }} | ||
{{- else -}} | ||
{{ default "default" .Values.serviceAccount.name }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Shared labels | ||
*/}} | ||
{{- define "kore.labels" -}} | ||
app: {{ template "kore.name" . }} | ||
chart: {{ template "kore.chart" . }} | ||
release: {{ .Release.Name }} | ||
date: {{ now | htmlDate }} | ||
{{- 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,17 @@ | ||
{{- if .Values.rbac.create }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
{{- include "kore.labels" . | nindent 4 }} | ||
name: {{ template "kore.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: cluster-admin | ||
apiGroup: rbac.authorization.k8s.io | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ template "kore.serviceAccountName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- 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,26 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
{{- include "kore.labels" . | nindent 4 }} | ||
name: {{ template "kore.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
name: {{ template "kore.fullname" . }} | ||
instance: {{ template "kore.fullname" . }}-instance | ||
template: | ||
metadata: | ||
labels: | ||
name: {{ template "kore.fullname" . }} | ||
instance: {{ template "kore.fullname" . }}-instance | ||
spec: | ||
serviceAccountName: {{ template "kore.serviceAccountName" . }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
imagePullSecrets: | ||
- name: {{ template "kore.fullname" . }}-docker-auth |
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,10 @@ | ||
apiVersion: v1 | ||
data: | ||
.dockerconfigjson: eyJhdXRocyI6eyJwcm9qZWN0a29yZS5henVyZWNyLmlvIjp7InVzZXJuYW1lIjoiYjUxNGI2MGMtNjhjYy00ZjEyLWIzNjEtMzg1ODg3OGIyNDc5IiwicGFzc3dvcmQiOiI0alg1dmtQVFNyVVE5NlVCYlUvQjdDUXJCb0p3VDYyV1NzNVdmWnRGYkI4PSIsImF1dGgiOiJZalV4TkdJMk1HTXROamhqWXkwMFpqRXlMV0l6TmpFdE16ZzFPRGczT0dJeU5EYzVPalJxV0RWMmExQlVVM0pWVVRrMlZVSmlWUzlDTjBOUmNrSnZTbmRVTmpKWFUzTTFWMlphZEVaaVFqZzkifX19 | ||
kind: Secret | ||
metadata: | ||
labels: | ||
{{- include "kore.labels" . | nindent 4 }} | ||
name: {{ template "kore.fullname" . }}-docker-auth | ||
namespace: {{ .Release.Namespace }} | ||
type: kubernetes.io/dockerconfigjson |
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 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: scaledobjects.kore.k8s.io | ||
annotations: | ||
"helm.sh/hook": crd-install | ||
spec: | ||
group: kore.k8s.io | ||
version: v1alpha1 | ||
names: | ||
kind: ScaledObject | ||
plural: scaledobjects | ||
scope: Namespaced |
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,9 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
{{- include "kore.labels" . | nindent 4 }} | ||
name: {{ template "kore.serviceAccountName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- 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,16 @@ | ||
nameOverride: | ||
fullnameOverride: | ||
|
||
image: | ||
repository: projectkore.azurecr.io/kore | ||
tag: master | ||
pullPolicy: Always | ||
|
||
replicaCount: 1 | ||
|
||
rbac: | ||
create: true | ||
|
||
serviceAccount: | ||
create: true | ||
name: kore-service-account |
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,44 @@ | ||
FROM ubuntu:18.04 | ||
|
||
# Install prerequisite | ||
RUN apt-get update && \ | ||
apt-get install -y wget curl build-essential git | ||
|
||
# Install azure-cli | ||
RUN apt-get install apt-transport-https lsb-release software-properties-common dirmngr -y && \ | ||
AZ_REPO=$(lsb_release -cs) && \ | ||
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \ | ||
tee /etc/apt/sources.list.d/azure-cli.list && \ | ||
apt-key --keyring /etc/apt/trusted.gpg.d/Microsoft.gpg adv \ | ||
--keyserver packages.microsoft.com \ | ||
--recv-keys BC528686B50D79E339D3721CEB3E94ADBE1229CF && \ | ||
apt-get update && \ | ||
apt-get install -y azure-cli | ||
|
||
# Install docker client | ||
RUN wget https://download.docker.com/linux/static/stable/x86_64/docker-18.09.3.tgz && \ | ||
docker_sha256=8b886106cfc362f1043debfe178c35b6f73ec42380b034a3919a235fe331e053 && \ | ||
echo "$docker_sha256 docker-18.09.3.tgz" | sha256sum -c - && \ | ||
tar xvzf docker-18.09.3.tgz && \ | ||
mv docker/* /usr/local/bin && \ | ||
rm -rf docker docker-18.09.3.tgz | ||
|
||
# Install golang | ||
RUN wget https://dl.google.com/go/go1.12.linux-amd64.tar.gz && \ | ||
go_sha256=750a07fef8579ae4839458701f4df690e0b20b8bcce33b437e4df89c451b6f13 && \ | ||
echo "$go_sha256 go1.12.linux-amd64.tar.gz" | sha256sum -c - && \ | ||
tar -C /usr/local -xvzf go1.12.linux-amd64.tar.gz && \ | ||
rm -rf go1.12.linux-amd64.tar.gz | ||
|
||
# Install helm/tiller | ||
RUN wget https://storage.googleapis.com/kubernetes-helm/helm-v2.13.0-linux-amd64.tar.gz && \ | ||
helm_sha256=15eca6ad225a8279de80c7ced42305e24bc5ac60bb7d96f2d2fa4af86e02c794 && \ | ||
echo "$helm_sha256 helm-v2.13.0-linux-amd64.tar.gz" | sha256sum -c - && \ | ||
tar xzvf helm-v2.13.0-linux-amd64.tar.gz && \ | ||
mv linux-amd64/helm /usr/local/bin && mv linux-amd64/tiller /usr/local/bin && \ | ||
rm -rf linux-amd64 helm-v2.13.0-linux-amd64.tar.gz && \ | ||
helm init --client-only | ||
|
||
ENV PATH=${PATH}:/usr/local/go/bin \ | ||
GOROOT=/usr/local/go \ | ||
GOPATH=/go |