Skip to content

Commit

Permalink
#185 use prefix for resources
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-dammeier committed Jul 23, 2024
1 parent e7183aa commit 051755f
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 11 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Set these to the desired values
ARTIFACT_ID=k8s-dogu-operator
VERSION=1.2.0
VERSION=1.2.0-test

IMAGE=cloudogu/${ARTIFACT_ID}:${VERSION}
GOTAG=1.22
Expand Down Expand Up @@ -100,3 +100,11 @@ mocks: ${MOCKERY_BIN} ## Generate all mocks for the dogu operator.
@${MOCKERY_BIN} --output internal/cloudogu/mocks --srcpkg github.com/cloudogu/k8s-dogu-operator/internal/cloudogu --all
@${MOCKERY_BIN} --output internal/thirdParty/mocks --srcpkg github.com/cloudogu/k8s-dogu-operator/internal/thirdParty --all
@echo "Mocks successfully created."

.PHONY: upload-to-k8s-testing
upload-to-k8s-testing: helm-package compile
gcloud auth configure-docker europe-west3-docker.pkg.dev -q
helm push target/k8s/helm/$(ARTIFACT_ID)-$(VERSION).tgz oci://europe-west3-docker.pkg.dev/ces-coder-workspaces/ces-test-docker-helm-repo/charts
helm push target/k8s/helm/$(ARTIFACT_ID)-$(VERSION).tgz oci://registry.cloudogu.com/k8s-testing
docker build . -t europe-west3-docker.pkg.dev/ces-coder-workspaces/ces-test-docker-helm-repo/images/$(ARTIFACT_ID):$(VERSION)
docker push europe-west3-docker.pkg.dev/ces-coder-workspaces/ces-test-docker-helm-repo/images/$(ARTIFACT_ID):$(VERSION)
2 changes: 1 addition & 1 deletion config/samples/k8s_v1_dogurestart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
# Use `kubectl create` instead.
generateName: cas-restart-
spec:
doguName: cas
doguName: confluence
2 changes: 1 addition & 1 deletion config/samples/official/ldap-mapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ metadata:
app: ces
spec:
name: official/ldap-mapper
version: 1.3.0
version: 1.3.0-1
2 changes: 1 addition & 1 deletion config/samples/official/postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ metadata:
app: ces
spec:
name: official/postgresql
version: 12.15-1
version: 12.18-1
resources:
dataVolumeSize: "1Gi"
2 changes: 1 addition & 1 deletion config/samples/premium/confluence.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ metadata:
app: ces
spec:
name: premium/confluence
version: 7.13.8-1
version: 8.5.9-1
2 changes: 1 addition & 1 deletion k8s/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
Kubernetes 1.4+.
*/}}
{{- define "k8s-dogu-operator.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{ .Release.Namespace}}-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}


Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/templates/cluster-role-binding-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ roleRef:
name: '{{ include "k8s-dogu-operator.name" . }}-cluster-role'
subjects:
- kind: ServiceAccount
name: '{{ include "k8s-dogu-operator.name" . }}-controller-manager'
name: '{{ include "k8s-dogu-operator.name" . }}-sa
namespace: '{{ .Release.Namespace }}'
2 changes: 1 addition & 1 deletion k8s/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ spec:
subPath: docker-registry-cert.pem
securityContext:
runAsNonRoot: true
serviceAccountName: {{ include "k8s-dogu-operator.name" . }}-controller-manager
serviceAccountName: {{ include "k8s-dogu-operator.name" . }}-sa
terminationGracePeriodSeconds: 10
volumes:
- name: docker-registry-cert
Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/templates/metrics-service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "k8s-dogu-operator.name" . }}-controller-manager-metrics-service
name: {{ include "k8s-dogu-operator.name" . }}-metrics-service
labels:
control-plane: controller-manager
{{- include "k8s-dogu-operator.labels" . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "k8s-dogu-operator.name" . }}-controller-manager
name: {{ include "k8s-dogu-operator.name" . }}-sa
labels:
{{- include "k8s-dogu-operator.labels" . | nindent 4 }}
2 changes: 1 addition & 1 deletion k8s/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ additionalImages:
controllerManager:
image:
repository: cloudogu/k8s-dogu-operator
tag: 1.2.0
tag: 1.2.0-test
imagePullPolicy: IfNotPresent
env:
logLevel: debug
Expand Down

0 comments on commit 051755f

Please sign in to comment.