You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -98,11 +106,11 @@ helm-reinstall: helm-delete helm-apply ## Uninstalls the current helm chart and
98
106
.PHONY: helm-chart-import
99
107
helm-chart-import: ${CHECK_VAR_TARGETS} helm-generate helm-package ${IMAGE_IMPORT_TARGET} ## Imports the currently available chart into the cluster-local registry.
100
108
@if [[ ${STAGE}=="development" ]];then\
101
-
echo"Import ${HELM_DEV_RELEASE_TGZ} into K8s cluster ${CES_REGISTRY_HOST}/${HELM_ARTIFACT_NAMESPACE}...";\
crd-helm-chart-import: ${CHECK_VAR_TARGETS} check-k8s-artifact-id crd-helm-generate crd-helm-package ## Imports the currently available Helm CRD chart into the cluster-local registry.
92
92
@if [[ ${STAGE}=="development" ]];then\
93
-
echo"Import ${HELM_CRD_DEV_RELEASE_TGZ} into K8s cluster ${CES_REGISTRY_HOST}/${HELM_ARTIFACT_NAMESPACE}...";\
CLIENT_GEN_OUTPUT_PKG?="$(shell awk '/^module/ {print $$2}' go.mod)" # Get module path from go.mod
135
+
CLIENT_GEN_CLIENTSET_NAME?="client"
136
+
CLIENT_GEN_CLIENTSET_INPUT?="$(shell find api/ -mindepth 1 -maxdepth 1 -type d -printf 'api/%P\n' | paste -sd, -)" # Get all packages under version names under api/
137
+
CLIENT_GEN_INPUT_BASE?="$(shell pwd)"
138
+
139
+
.PHONY: generate-client
140
+
generate-client: ${CLIENT_GEN} ## Generate client code from API definitions.
Copy file name to clipboardExpand all lines: build/make/k8s.mk
+55-13Lines changed: 55 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -33,41 +33,75 @@ BINARY_CRANE_ARCHIVE_STRIP?=0
33
33
SHELL = /usr/bin/env bash -o pipefail
34
34
.SHELLFLAGS = -ec
35
35
36
+
ifneq (${KUBECONFIG},)
37
+
# Values from the repo-local .env become plain make variables first. Export KUBECONFIG so
38
+
# recipe shells and nested kubectl/helm calls use the same kubeconfig file as the make logic.
39
+
export KUBECONFIG
40
+
endif
41
+
36
42
# The productive tag of the image
37
43
IMAGE ?=
38
44
39
45
# Set production as default stage. Use "development" as stage in your .env file to generate artifacts
40
46
# with development images pointing to CES_REGISTRY_URL_PREFIX.
41
47
STAGE?=production
42
48
43
-
# Set the "local" as runtime-environment, to push images to the container-registry of the local cluster and to apply resources to the local cluster.
44
-
# Use "remote" as runtime-environment in your .env file to push images to the container-registry at "registry.cloudogu.com/testing" and to apply resources to the configured kubernetes-context in KUBE_CONTEXT_NAME.
49
+
# Set "local" as runtime-environment to use the legacy in-cluster registry of the local cluster.
50
+
# Set "k3d" as runtime-environment for local k3d development with local registry push/pull:
51
+
# - push from host to ${K3D_PUSH_REGISTRY_HOST}${K3D_PUSH_REGISTRY_NAMESPACE}
52
+
# - pull in-cluster via ${K3D_PULL_REGISTRY_HOST}${K3D_PULL_REGISTRY_NAMESPACE}
53
+
# Use "remote" as runtime-environment in your .env file to push images to the container-registry at
54
+
# "registry.cloudogu.com/testing" and to apply resources to the configured kubernetes-context in KUBE_CONTEXT_NAME.
45
55
RUNTIME_ENV?=local
46
56
$(info RUNTIME_ENV=$(RUNTIME_ENV))
47
57
48
58
# The host and port of the local cluster
49
59
K3S_CLUSTER_FQDN?=k3ces.localdomain
50
60
K3S_LOCAL_REGISTRY_PORT?=30099
51
-
52
-
# The URL of the container-registry to use. Defaults to the registry of the local-cluster.
53
-
# If RUNTIME_ENV is "remote" it is "registry.cloudogu.com/testing", if ENVIRONMENT is "ci" it is "registry.cloudogu.com/ci"
54
-
# if run on ci (jenkins) the images must be pushed to a separate namespace in order to free space every night after the build.
0 commit comments