Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add install manifest #48

Merged
merged 5 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ KO_VERSION := v0.14.1
HELM := $(TOOLS_DIR)/helm
HELM_VERSION := v3.10.1
TOOLS := $(REGISTER_GEN) $(OPENAPI_GEN) $(KIND) $(KO) $(HELM)
ifeq ($(GOOS), darwin)
SED := gsed
else
SED := sed
endif

$(REGISTER_GEN):
@echo Install register-gen... >&2
Expand Down Expand Up @@ -129,10 +134,18 @@ codegen-helm-docs: ## Generate helm docs
@echo Generate helm docs... >&2
@docker run -v ${PWD}/charts:/work -w /work jnorwood/helm-docs:v1.11.0 -s file

.PHONY: codegen-manifest-install-latest
codegen-install-manifest: $(HELM) ## Create install manifest
@echo Generate latest install manifest... >&2
@$(HELM) template kyverno --namespace kyverno ./charts/reports-server/ \
vishal-chdhry marked this conversation as resolved.
Show resolved Hide resolved
| $(SED) -e '/^#.*/d' \
> ./config/install.yaml

.PHONY: codegen
codegen: ## Rebuild all generated code and docs
codegen: codegen-helm-docs
codegen: codegen-openapi
codegen: codegen-install-manifest

.PHONY: verify-codegen
verify-codegen: codegen ## Verify all generated code and docs are up to date
Expand Down
3 changes: 2 additions & 1 deletion charts/reports-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ helm install reports-server --namespace reports-server --create-namespace report
| postgresql.enabled | bool | `true` | Deploy postgresql dependency chart |
| postgresql.auth.postgresPassword | string | `"reports"` | |
| postgresql.auth.database | string | `"reportsdb"` | |
| ephemeralReportsStorage.enabled | bool | `true` | Store ephemeral reports in reports-server |
| apiServices.enabled | bool | `true` | Store reports in reports-server |
| apiServices.installEphemeralReportsService | bool | `true` | Store ephemeral reports in reports-server |
| nameOverride | string | `""` | Name override |
| fullnameOverride | string | `""` | Full name override |
| replicaCount | int | `1` | Number of pod replicas |
Expand Down
5 changes: 4 additions & 1 deletion charts/reports-server/templates/api-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{- if .Values.apiServices.enabled }}
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
Expand All @@ -16,7 +18,7 @@ spec:
version: v1alpha2
versionPriority: 100

{{- if .Values.ephemeralReportsStorage.enabled }}
{{- if .Values.apiServices.installEphemeralReportsService }}
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
Expand All @@ -35,4 +37,5 @@ spec:
namespace: {{ $.Release.Namespace }}
version: v1
versionPriority: 100
{{- end }}
{{- end }}
7 changes: 5 additions & 2 deletions charts/reports-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ postgresql:

database: reportsdb

ephemeralReportsStorage:
apiServices:

# -- Store ephemeral reports in reports-server
# -- Store reports in reports-server
enabled: true

# -- Store ephemeral reports in reports-server
installEphemeralReportsService: true

# -- Name override
nameOverride: ""

Expand Down
Loading
Loading