diff --git a/charts/icm-as/Chart.yaml b/charts/icm-as/Chart.yaml index 687d1ddc..49cd47e6 100644 --- a/charts/icm-as/Chart.yaml +++ b/charts/icm-as/Chart.yaml @@ -5,8 +5,3 @@ version: 1.4.0 description: Intershop Commerce Management - AppServer type: application appVersion: 11.2.1 -dependencies: -- name: icm-job - version: 1.0.1 - repository: file://../icm-job - condition: job.enabled diff --git a/charts/icm-as/templates/_environments.tpl b/charts/icm-as/templates/_environments.tpl index 5d37cff6..79404324 100644 --- a/charts/icm-as/templates/_environments.tpl +++ b/charts/icm-as/templates/_environments.tpl @@ -82,4 +82,26 @@ env: - name: INTERSHOP_PAGECACHE_REDIS_ENABLED value: "true" {{- end }} -{{- end -}} \ No newline at end of file +{{- end -}} + +{{/* +Job-specific-environment +*/}} +{{- define "icm-as.envJob" }} +{{- include "icm-as.env" . }} +- name: MAIN_CLASS + value: "com.intershop.beehive.core.capi.job.JobServer" +- name: INTERSHOP_JOB_SERVER_EXCLUSIVE + value: "true" +- name: INTERSHOP_SERVER_ASSIGNEDTOSERVERGROUP + value: {{ .jobServerGroup }} +{{- end -}} + +{{/* +AppServer-specific-environment +*/}} +{{- define "icm-as.envAS" }} +{{- include "icm-as.env" . }} +- name: INTERSHOP_SERVER_ASSIGNEDTOSERVERGROUP + value: "BOS,WSF" +{{- end -}} diff --git a/charts/icm-as/templates/as-deployment.yaml b/charts/icm-as/templates/as-deployment.yaml index d9620545..9e926422 100644 --- a/charts/icm-as/templates/as-deployment.yaml +++ b/charts/icm-as/templates/as-deployment.yaml @@ -52,7 +52,7 @@ spec: containers: - name: icm-as-server {{- include "icm-as.image" . | nindent 8 }} - {{- include "icm-as.env" . | nindent 8 }} + {{- include "icm-as.envAS" . | nindent 8 }} {{- include "icm-as.ports" . | nindent 8 }} {{- include "icm-as.resources" . | nindent 8 }} {{- include "icm-as.volumeMounts" . | nindent 8 }} diff --git a/charts/icm-as/templates/jobserver-deployment.yaml b/charts/icm-as/templates/jobserver-deployment.yaml index a3a7148b..d5f6cc76 100644 --- a/charts/icm-as/templates/jobserver-deployment.yaml +++ b/charts/icm-as/templates/jobserver-deployment.yaml @@ -59,21 +59,6 @@ spec: {{- include "icm-as.volumes" . | nindent 10 }} {{- end -}} -{{/* -Job-specific-environment -*/}} -{{- define "icm-as.envJob" }} -{{- include "icm-as.env" . }} -- name: MAIN_CLASS - value: "com.intershop.beehive.core.capi.job.JobServer" -- name: INTERSHOP_JOB_SERVER_EXCLUSIVE - value: "true" -- name: INTERSHOP_SERVER_ASSIGNEDTOSERVERGROUP - value: {{ .jobServerGroup }} -- name: SERVER_NAME - value: {{ .jobServerName }} -{{- end -}} - {{/* Job-scheduling service */}} diff --git a/charts/icm-as/values.yaml b/charts/icm-as/values.yaml index 0a134d47..ab17d2d2 100644 --- a/charts/icm-as/values.yaml +++ b/charts/icm-as/values.yaml @@ -350,6 +350,7 @@ sslCertificateRetrieval: # In order to override these properties add them in the job section, e.g. add a 'resources' section to # configure different cpu or memory limits. job: + # if enabled=true the job controller must be deployed at cluster separatelly. see icm-job chart. enabled: false # If true, job-server-support will be available but no jobs will be created diff --git a/charts/icm-job/Chart.yaml b/charts/icm-job/Chart.yaml index 2b4c723e..21ea56a5 100644 --- a/charts/icm-job/Chart.yaml +++ b/charts/icm-job/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -description: Intershop Commerce Management - ICM Job +description: Intershop Commerce Management - ICM Job Controller # name and version must be in this exact order, otherwise bump2version won't work name: icm-job version: 1.0.1 diff --git a/charts/icm-job/README.md b/charts/icm-job/README.md index dc1a1334..51ec6793 100644 --- a/charts/icm-job/README.md +++ b/charts/icm-job/README.md @@ -2,7 +2,15 @@ This chart brings job server functionality into the [ICM Application Server](../icm-as/README.md) (`icm-as`). If enabled long running jobs could run outside of the application server as kubernetes jobs. -It will install the ICMJob-CRD (Custom Resource Definition) per default. If the ICMJob-CRD already exists, it will be skipped with a warning. If you wish to skip this CRD installation step, you can pass the `--skip-crds` flag to the `helm install/upgrade` command. Note that uninstalling this chart will *NOT* uninstall the CRD. In order to uninstall the ICMJob-CRD use: +## Initial Deployment + +```bash +helm install icm-job icm-job -n icm-system +``` + +## Redeployment + +The chart will install the ICMJob-CRD (Custom Resource Definition) per default. If the ICMJob-CRD already exists, it will be skipped with a warning. If you wish to skip this CRD installation step, you can pass the `--skip-crds` flag to the `helm install/upgrade` command. Note that uninstalling this chart will *NOT* uninstall the CRD. In order to uninstall the ICMJob-CRD use: ```bash kubectl delete -f crds/icm-job-controller.yaml diff --git a/charts/icm-job/templates/icm-job.yaml b/charts/icm-job/templates/icm-job.yaml index 8276b4f5..9baf1995 100644 --- a/charts/icm-job/templates/icm-job.yaml +++ b/charts/icm-job/templates/icm-job.yaml @@ -18,7 +18,6 @@ metadata: app.kubernetes.io/name: serviceaccount app.kubernetes.io/part-of: project name: icm-controller-manager - namespace: icm-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role @@ -31,7 +30,6 @@ metadata: app.kubernetes.io/name: role app.kubernetes.io/part-of: project name: icm-leader-election-role - namespace: icm-system rules: - apiGroups: - "" @@ -169,7 +167,6 @@ metadata: app.kubernetes.io/name: rolebinding app.kubernetes.io/part-of: project name: icm-leader-election-rolebinding - namespace: icm-system roleRef: apiGroup: rbac.authorization.k8s.io kind: Role @@ -177,7 +174,6 @@ roleRef: subjects: - kind: ServiceAccount name: icm-controller-manager - namespace: icm-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -197,7 +193,6 @@ roleRef: subjects: - kind: ServiceAccount name: icm-controller-manager - namespace: icm-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -217,7 +212,6 @@ roleRef: subjects: - kind: ServiceAccount name: icm-controller-manager - namespace: icm-system --- apiVersion: v1 kind: Service @@ -231,7 +225,6 @@ metadata: app.kubernetes.io/part-of: project control-plane: controller-manager name: icm-controller-manager-metrics-service - namespace: icm-system spec: ports: - name: https @@ -253,7 +246,6 @@ metadata: app.kubernetes.io/part-of: project control-plane: controller-manager name: icm-controller-manager - namespace: icm-system spec: replicas: 1 selector: @@ -315,7 +307,7 @@ spec: - --leader-elect command: - /manager - image: intershophub/icm-job-operator:1.0.0-dev5 + image: "{{ .Values.image.repository }}{{ if not (contains ":" .Values.image.repository) }}:{{ .Values.image.tag | default .Chart.AppVersion }}{{ end }}" imagePullPolicy: IfNotPresent livenessProbe: httpGet: diff --git a/charts/icm-job/values.yaml b/charts/icm-job/values.yaml index dbda1c80..445f7f32 100644 --- a/charts/icm-job/values.yaml +++ b/charts/icm-job/values.yaml @@ -11,3 +11,6 @@ dockerSecret: ## Intershop: These secrets also last for customization images imagePullSecrets: - "dockerhub" + +image: + repository: intershophub/icm-job-operator:1.0.0-dev5