Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion build-aux/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ build-output/chart-%.tgz: build-output/chart-%.d
# Convenience aliases for the Helm chart
chart_dir = build-output/chart-$(patsubst v%,%,$(VERSION))_$(patsubst v%,%,$(CHART_VERSION)).d
chart_tgz = $(patsubst %.d,%.tgz,$(chart_dir))
chart: $(chart_tgz)
# chart: $(chart_tgz)
chart:
@echo "Don't use make chart -- instead, cd charts && make"
PHONY: chart

_major_version = $(firstword $(subst ., ,$(patsubst v%,%,$(VERSION))))
Expand Down
44 changes: 44 additions & 0 deletions charts/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
IMAGE_REPO ?= ghcr.io/emissary-ingress/emissary

all: charts

charts: emissary-crds-chart emissary-ingress

# These are just aliases
emissary-crds-chart: emissary-crds-chart-$(VERSION).tgz
emissary-ingress: emissary-ingress-$(VERSION).tgz

version-check:
@if [ -z "$(VERSION)" ]; then \
echo "VERSION must be set (e.g. VERSION=1.0.0-alpha.3)" >&2 ;\
exit 1; \
fi
.PHONY: version-check

helm-registry-check:
@if [ -z "$(HELM_REGISTRY)" ]; then \
echo "HELM_REGISTRY must be set (e.g. HELM_REGISTRY=oci://docker.io/dwflynn)" >&2 ;\
exit 1; \
fi
.PHONY: helm-registry-check

emissary-crds-chart-$(VERSION).tgz: version-check emissary-crds
bash bin/build-chart emissary-crds $(VERSION) $(IMAGE_REPO) $$(pwd)
ls -l emissary-crds-chart-$(VERSION).tgz

emissary-ingress-$(VERSION).tgz: version-check emissary-chart
bash bin/build-chart emissary-chart $(VERSION) $(IMAGE_REPO) $$(pwd)
ls -l emissary-ingress-$(VERSION).tgz

push-chart: version-check helm-registry-check charts
if [ -n "$(HELM_REGISTRY)" ]; then \
helm push emissary-crds-chart-$(VERSION).tgz $(HELM_REGISTRY); \
helm push emissary-ingress-$(VERSION).tgz $(HELM_REGISTRY); \
else \
echo "HELM_REGISTRY not set, not pushing"; \
fi

clean:
rm -rf emissary-crds-chart-*
rm -rf emissary-ingress-*

50 changes: 50 additions & 0 deletions charts/bin/build-chart
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/sh

check_arg () {
if [ -z "$2" ]; then
echo "$1 cannot be unset" >&2
exit 1
fi
}

if [ $# -ne 4 ]; then
echo "Usage: $0 <chart-source> <version> <image-repo> <output-dir>" >&2
exit 1
fi

set -e

chart_source="$1"
version="$2"
image_repo="$3"
output_dir="$4"

check_arg chart_source "$chart_source"
check_arg version "$version"
check_arg image_repo "$image_repo"
check_arg output_dir "$output_dir"

# set -x

workdir=$(mktemp -d -t build-chart)
trap "rm -rf $workdir" EXIT

cp -pr "$chart_source"/* "$workdir"

for file in "$workdir/Chart.yaml" "$workdir/values.yaml"; do
sed \
-e "s/@version@/$version/g" \
-e "s/@chartVersion@/$version/g" \
-e "s,@imageRepo@,${image_repo},g" \
< ${file}.in > ${file}
rm -f ${file}.in
done

go run kubepack.dev/[email protected] \
-d "$workdir/doc.yaml" \
-t "$workdir/readme.tpl" \
-v "$workdir/values.yaml" \
> $workdir/README.md

helm package --destination="$output_dir" "$workdir"

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ keywords:
- emissary
- emissary ingress
maintainers:
- name: flydiverny
email: [email protected]
- name: kflynn
email: flynn@datawire.io
- name: nbkrause
email: [email protected]
email: flynn@buoyant.io
- name: aliceproxy
email:
engine: gotpl
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ chart:
values: "-- generate from values file --"
valuesExample: "-- generate from values file --"
prerequisites:
- "Kubernetes v1.11+"
- "Kubernetes v1.11+"
release:
name: emissary-ingress
namespace: ambassador
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
Congratulations! You've successfully installed Emissary Ingress!
Congratulations! You've successfully installed Emissary-ingress!

-------------------------------------------------------------------------------
To get the IP address of Emissary, run the following commands:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ adminService:
type: ClusterIP
port: 8877
snapshotPort: 8005
goPluginMetricsPort:
goPluginMetricsPort:
# If explicit NodePort for admin service is required
nodePort:
# Annotations to apply to Ambassador admin service
Expand Down
22 changes: 22 additions & 0 deletions charts/emissary-crds/.helmignore
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
OWNERS
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
8 changes: 8 additions & 0 deletions charts/emissary-crds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Change Log

This file documents all notable changes to Ambassador Helm Chart. The release
numbering uses [semantic versioning](http://semver.org).

## v3.10.0 - TBD

Initial release of the CRDs chart.
22 changes: 22 additions & 0 deletions charts/emissary-crds/Chart.yaml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: "v2"
appVersion: "@version@"
description: |
Emissary-ingress is a CNCF API Gateway built on Envoy Proxy, specializing
in self-service operation with minimal operational complexity.
type: application
home: https://emissary-ingress.dev/
keywords:
- emissary-ingress
- crds
- ingress-controller
- conversion-webhook
kubeVersion: ">=1.25.0-0"
name: "emissary-crds-chart"
sources:
- https://github.com/emissary-ingress/emissary/
version: "@version@"
#icon: https://linkerd.io/images/logo-only-200h.png
maintainers:
- name: Emissary authors
email: [email protected]
url: https://github.com/emissary-ingress/emissary/
Empty file added charts/emissary-crds/README.md
Empty file.
18 changes: 18 additions & 0 deletions charts/emissary-crds/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
project:
name: Emissary-ingress CRDs
shortName: emissary-crds
url: https://github.com/emissary-ingress/emissary
description: CRDs for the Emissary-ingress project
app: Emissary-ingress
repository:
url: oci://ghcr.io/emissary-ingress/emissary-crds
name: emissary-crds
chart:
name: emissary-crds
values: "-- generate from values file --"
valuesExample: "-- generate from values file --"
prerequisites:
- "Kubernetes v1.11+"
release:
name: emissary-crds
namespace: emissary-system
66 changes: 66 additions & 0 deletions charts/emissary-crds/readme.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# {{ .Project.ShortName }}

[{{ .Project.Name }}]({{ .Project.URL }}) - {{ .Project.Description }}

## Introduction

This chart deploys the Emissary-ingress CRDS and (optionally) conversion
webhook on a [Kubernetes](http://kubernetes.io) cluster using the
[Helm](https://helm.sh) package manager.

## Prerequisites
{{ range .Prerequisites }}
- {{ . }}
{{- end }}

## Installing the Chart

A typical installation will use the `emissary-system` namespace:

```console
helm install {{ .Release.Name }} \
--namespace emissary-system --create-namespace \
{{ .Repository.Name }}/{{ .Chart.Name }} \
--version {{ .Chart.Version }} \
--wait
```

The command deploys the Emissary-ingress CRDs on the Kubernetes cluster in the
default configuration. The [configuration](#configuration) section lists the
parameters that can be configured during installation.

## Changelog

Notable chart changes are listed in the [CHANGELOG](./CHANGELOG.md)

{{ if .Chart.Values -}}
## Configuration

The following table lists the configurable parameters of the `{{ .Chart.Name }}` chart and their default values.

{{ .Chart.Values }}

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:

```console
helm install {{ .Release.Name }} \
--namespace emissary-system --create-namespace \
{{ .Repository.Name }}/{{ .Chart.Name }} \
--version {{ .Chart.Version }} \
--set {{ .Chart.ValuesExample }} \
--wait
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:


```console
helm install {{ .Release.Name }} \
--namespace emissary-system --create-namespace \
{{ .Repository.Name }}/{{ .Chart.Name }} \
--version {{ .Chart.Version }} \
--values values.yaml \
--wait
```
{{- end }}
14 changes: 14 additions & 0 deletions charts/emissary-crds/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
The emissary-crds chart was successfully installed! 🎉

To complete the Emissary-ingress installation, please now proceed to install
the emissary-ingress chart in the {{ .Release.Namespace }} namespace.

{{- if .Values.enableLegacyVersions }}
The V2 CRDs and apiext are installed and available for use.
{{- if .Values.enableV1 }}
The V1 CRDs are available, too.
{{- end -}}
{{- end }}

Looking for more? Visit https://emissary-ingress.dev/ !

23 changes: 23 additions & 0 deletions charts/emissary-crds/templates/_helpers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- define "partials.conversion" -}}
{{- if .Values.enableLegacyVersions }}
conversion:
strategy: Webhook
webhook:
clientConfig:
service:
name: emissary-apiext
namespace: {{ .Release.Namespace }}
path: /webhooks/crd-convert
port: 443
conversionReviewVersions:
- v1
{{- end -}}
{{- end -}}

{{- define "partials.v3alpha1storage" -}}
{{- if .Values.enableLegacyVersions -}}
false
{{- else -}}
true
{{- end -}}
{{- end -}}
Loading
Loading