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

allow overriding release name #416

Closed
wants to merge 7 commits into from
Closed
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
2 changes: 1 addition & 1 deletion charts/hono/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: hono
description: |
Eclipse Hono™ provides remote service interfaces for connecting large numbers of IoT devices to a back end and
interacting with them in a uniform way regardless of the device communication protocol.
version: 2.2.0
version: 2.2.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a 2.2.1 version now. Can you rebase? As discussed in an earlier comment, this should better be 2.3.0 here.

# Version of Hono being deployed by the chart
appVersion: 2.2.0
keywords:
Expand Down
6 changes: 5 additions & 1 deletion charts/hono/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ The command removes all the Kubernetes components associated with the chart and

## Release Notes

### 2.2.1

* Allow customizing the pod/service names irrespective or .Release.Name

### 2.2.0

* Use Hono 2.2.0 container images.
Expand Down Expand Up @@ -363,7 +367,7 @@ amqpMessagingNetworkExample:

# mount (existing) Kubernetes secret which contains
# credentials for connecting to AMQP network
# into Command Router and protocol adapter containers
# into Command Router and protocol adapter containers
commandRouterService:
extraVolumes:
- name: "amqp-network"
Expand Down
10 changes: 5 additions & 5 deletions charts/hono/config/infinispan/hono-data-grid.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
<!--
Copyright (c) 2020, 2022 Contributors to the Eclipse Foundation

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0

SPDX-License-Identifier: EPL-2.0
-->
<infinispan
Expand Down Expand Up @@ -84,7 +84,7 @@
<hotrod-connector name="hotrod">
<authentication security-realm="ApplicationRealm">
<sasl mechanisms="SCRAM-SHA-512 SCRAM-SHA-384 DIGEST-SHA-512 DIGEST-SHA-384 DIGEST-MD5"
server-name='{{ printf "%s-data-grid" .Release.Name }}'
server-name='{{ printf "%s-data-grid" (include "hono.fullname" .) }}'
qop="auth" />
</authentication>
</hotrod-connector>
Expand Down
6 changes: 3 additions & 3 deletions charts/hono/config/router/qdrouterd.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
["router", {
"id": "{{ .Release.Name }}.Example.Router",
"id": "{{ include "hono.fullname" . }}.Example.Router",
"mode": "standalone",
"workerThreads": 3
}],
Expand All @@ -13,7 +13,7 @@

["authServicePlugin", {
"name": "Hono Auth",
"host": "{{ .Release.Name }}-service-auth",
"host": "{{ include "hono.fullname" . }}-service-auth",
"port": 5671,
"sslProfile": "auth-server-profile"
}],
Expand Down Expand Up @@ -90,7 +90,7 @@
"host": "{{ .Values.amqpMessagingNetworkExample.broker.serviceBus.host }}",
"idleTimeoutSeconds": 120
{{- else }}
"host": "{{ .Release.Name }}-artemis",
"host": "{{ include "hono.fullname" . }}-artemis",
"verifyHostname": false
{{- end }}
}],
Expand Down
2 changes: 1 addition & 1 deletion charts/hono/example/add_example_data_device_registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# SPDX-License-Identifier: EPL-2.0
#*******************************************************************************
HTTP_BASE_URL="http://{{ .Release.Name }}-service-device-registry:8080/v1"
HTTP_BASE_URL="http://{{ include "hono.fullname" . }}-service-device-registry:8080/v1"

check_status() {
EXIT_STATUS=$1
Expand Down
28 changes: 14 additions & 14 deletions charts/hono/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,41 @@ The output should look similar to this:

NAME {{ "READY STATUS RESTARTS AGE" | indent ( len .Release.Name ) }}
{{- if .Values.adapters.amqp.enabled }}
{{ .Release.Name }}-adapter-amqp-65cfb4d675-g5wn4 1/1 Running 0 5m50s
{{ include "hono.fullname" . }}-adapter-amqp-65cfb4d675-g5wn4 1/1 Running 0 5m50s
{{- end }}
{{- if .Values.adapters.coap.enabled }}
{{ .Release.Name }}-adapter-coap-786b784f47-qx9tg 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-adapter-coap-786b784f47-qx9tg 1/1 Running 0 5m51s
{{- end }}
{{- if .Values.adapters.http.enabled }}
{{ .Release.Name }}-adapter-http-66bd6bb89c-mng5t 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-adapter-http-66bd6bb89c-mng5t 1/1 Running 0 5m51s
{{- end }}
{{- if .Values.adapters.lora.enabled }}
{{ .Release.Name }}-adapter-lora-341fca588c-1hl8n 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-adapter-lora-341fca588c-1hl8n 1/1 Running 0 5m51s
{{- end }}
{{- if .Values.adapters.mqtt.enabled }}
{{ .Release.Name }}-adapter-mqtt-765fcd578b-5rl7n 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-adapter-mqtt-765fcd578b-5rl7n 1/1 Running 0 5m51s
{{- end }}
{{- if ( has "amqp" .Values.messagingNetworkTypes ) }}
{{ .Release.Name }}-artemis-f8f7dc7f4-864cj 1/1 Running 0 5m51s
{{ .Release.Name }}-dispatch-router-6c77dc78bd-hjn4l 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-artemis-f8f7dc7f4-864cj 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-dispatch-router-6c77dc78bd-hjn4l 1/1 Running 0 5m51s
{{- end }}
{{- if ( has "kafka" .Values.messagingNetworkTypes ) }}
{{ .Release.Name }}-kafka-0 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-kafka-0 1/1 Running 0 5m51s
{{- end }}
{{- if all .Values.deviceRegistryExample.enabled ( eq .Values.deviceRegistryExample.type "mongodb" ) }}
{{ .Release.Name }}-monogodb-server-77ffb85c97-78554 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-monogodb-server-77ffb85c97-78554 1/1 Running 0 5m51s
{{- end }}
{{ .Release.Name }}-service-auth-84d9695cfc-5wlfh 1/1 Running 0 5m51s
{{ .Release.Name }}-service-command-router-687fd4fbcf-7527b 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-service-auth-84d9695cfc-5wlfh 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-service-command-router-687fd4fbcf-7527b 1/1 Running 0 5m51s
{{- if .Values.deviceRegistryExample.enabled }}
{{- if eq .Values.deviceRegistryExample.type "embedded" }}
{{ .Release.Name }}-service-device-registry-0 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-service-device-registry-0 1/1 Running 0 5m51s
{{- else }}
{{ .Release.Name }}-service-device-registry-64d645dd9c-q9c5q 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-service-device-registry-64d645dd9c-q9c5q 1/1 Running 0 5m51s
{{- end }}
{{- end }}
{{- if ( has "kafka" .Values.messagingNetworkTypes ) }}
{{ .Release.Name }}-zookeeper-0 1/1 Running 0 5m51s
{{ include "hono.fullname" . }}-zookeeper-0 1/1 Running 0 5m51s
{{- end }}

Once all pods have reached the READY state, you can start using Hono.
Expand Down
55 changes: 29 additions & 26 deletions charts/hono/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
Expand the name of the chart.
*/}}
{{- define "hono.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- $nameOverride := .dot.Values.nameOverride -}}
{{- empty $nameOverride | ternary .dot.Chart.Name (tpl $nameOverride .dot ) | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Expand All @@ -25,14 +26,16 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "hono.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- $fullnameOverride := .dot.Values.fullnameOverride -}}
{{- if $fullnameOverride -}}
{{- (tpl $fullnameOverride .dot) | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- $nameOverride := .dot.Values.nameOverride -}}
{{- $name := empty $nameOverride | ternary .dot.Chart.Name (tpl $nameOverride .dot) -}}
Comment on lines 28 to +34
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain the motivation for the change towards requiring a dict with the dot key here (instead of the top-level . scope as before)? This makes this PR quite big (and there are occurrences of include "hono.fullname" . that haven't been replaced yet).
I also wonder whether the tpl function really needs to be used here.

Same applies also to the hono.name, hono.chart and hono.std.labels named templates.

{{- if contains $name .dot.Release.Name -}}
{{- .dot.Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- printf "%s-%s" .dot.Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
Expand All @@ -41,7 +44,7 @@ If release name contains chart name it will be used as a full name.
Create chart name and version as used by the chart label.
*/}}
{{- define "hono.chart" }}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- printf "%s-%s" .dot.Chart.Name .dot.Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand Down Expand Up @@ -88,9 +91,9 @@ Add standard labels for resources as recommended by Helm best practices.
{{- define "hono.std.labels" -}}
app.kubernetes.io/name: {{ include "hono.name" . | quote }}
helm.sh/chart: {{ include "hono.chart" . | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .dot.Release.Service | quote }}
app.kubernetes.io/instance: {{ .dot.Release.Name | quote }}
app.kubernetes.io/version: {{ .dot.Chart.AppVersion | quote }}
{{- end }}


Expand All @@ -102,11 +105,11 @@ The scope passed in is expected to be a dict with keys
- "component": the value to use for the "app.kubernetes.io/component" label
*/}}
{{- define "hono.metadata" -}}
name: {{ printf "%s-%s" .dot.Release.Name .name | quote }}
name: {{ printf "%s-%s" (include "hono.fullname" . ) .name | quote }}
namespace: {{ .dot.Release.Namespace | quote }}
labels:
app.kubernetes.io/name: {{ include "hono.name" .dot | quote }}
helm.sh/chart: {{ include "hono.chart" .dot | quote }}
app.kubernetes.io/name: {{ include "hono.name" . | quote }}
helm.sh/chart: {{ include "hono.chart" . | quote }}
app.kubernetes.io/managed-by: {{ .dot.Release.Service | quote }}
app.kubernetes.io/instance: {{ .dot.Release.Name | quote }}
app.kubernetes.io/version: {{ .dot.Chart.AppVersion | quote }}
Expand All @@ -122,7 +125,7 @@ The scope passed in is expected to be a dict with keys
- "component": the value of the "app.kubernetes.io/component" label to match
*/}}
{{- define "hono.matchLabels" -}}
app.kubernetes.io/name: {{ include "hono.name" .dot | quote }}
app.kubernetes.io/name: {{ include "hono.name" . | quote }}
app.kubernetes.io/instance: {{ .dot.Release.Name | quote }}
app.kubernetes.io/component: {{ .component | quote }}
{{- end }}
Expand Down Expand Up @@ -237,7 +240,7 @@ messaging:
{{- if .dot.Values.amqpMessagingNetworkExample.enabled }}
name: {{ printf "Hono %s" .component | quote }}
amqpHostname: "hono-internal"
host: {{ printf "%s-dispatch-router" .dot.Release.Name | quote }}
host: {{ printf "%s-dispatch-router" ( include "hono.fullname" . ) | quote }}
port: 5673
keyPath: {{ .dot.Values.adapters.amqpMessagingNetworkSpec.keyPath | quote }}
certPath: {{ .dot.Values.adapters.amqpMessagingNetworkSpec.certPath | quote }}
Expand All @@ -263,7 +266,7 @@ The scope passed in is expected to be a dict with keys
kafka:
{{- if .dot.Values.kafkaMessagingClusterExample.enabled }}
commonClientConfig:
{{- $bootstrapServers := printf "%[1]s-%[2]s-0.%[1]s-%[2]s-headless:%d" .dot.Release.Name .dot.Values.kafka.nameOverride ( .dot.Values.kafka.service.ports.client | int ) }}
{{- $bootstrapServers := printf "%[1]s-%[2]s-0.%[1]s-%[2]s-headless:%d" ( include "hono.fullname" . ) .dot.Values.kafka.nameOverride ( .dot.Values.kafka.service.ports.client | int ) }}
bootstrap.servers: {{ $bootstrapServers | quote }}
{{- if eq .dot.Values.kafka.auth.clientProtocol "sasl_tls" }}
security.protocol: "SASL_SSL"
Expand Down Expand Up @@ -321,7 +324,7 @@ The scope passed in is expected to be a dict with keys
*/}}
{{- define "hono.deviceRegistryExampleClientConfig" -}}
name: {{ printf "Hono %s" .component | quote }}
host: {{ printf "%s-service-device-registry" .dot.Release.Name | quote }}
host: {{ printf "%s-service-device-registry" ( include "hono.fullname" .dot ) | quote }}
port: 5671
credentialsPath: "/opt/hono/config/adapter.credentials"
trustStorePath: {{ .dot.Values.deviceRegistryExample.clientTrustStorePath | default "/opt/hono/tls/ca.crt" | quote }}
Expand All @@ -343,7 +346,7 @@ command:
{{- if .dot.Values.amqpMessagingNetworkExample.enabled }}
name: {{ printf "Hono %s" $adapter | quote }}
amqpHostname: "hono-internal"
host: {{ printf "%s-dispatch-router" .dot.Release.Name | quote }}
host: {{ printf "%s-dispatch-router" ( include "hono.fullname" .dot ) | quote }}
port: 5673
keyPath: {{ .dot.Values.adapters.commandAndControlSpec.keyPath | quote }}
certPath: {{ .dot.Values.adapters.commandAndControlSpec.certPath | quote }}
Expand Down Expand Up @@ -384,7 +387,7 @@ commandRouter:
{{- .dot.Values.adapters.commandRouterSpec | toYaml | nindent 2 }}
{{- else }}
name: {{ printf "Hono %s" $adapter | quote }}
host: {{ printf "%s-service-command-router" .dot.Release.Name | quote }}
host: {{ printf "%s-service-command-router" ( include "hono.fullname" .dot ) | quote }}
port: 5671
credentialsPath: "/opt/hono/config/adapter.credentials"
trustStorePath: {{ .dot.Values.commandRouterService.clientTrustStorePath | default "/opt/hono/tls/ca.crt" | quote }}
Expand Down Expand Up @@ -455,7 +458,7 @@ quarkus:
exporter:
otlp:
{{- if .dot.Values.jaegerBackendExample.enabled }}
endpoint: {{ printf "http://%s-jaeger-collector:4317" .dot.Release.Name | quote }}
endpoint: {{ printf "http://%s-jaeger-collector:4317" ( include "hono.fullname" .dot ) | quote }}
{{- else }}
endpoint: "http://127.0.0.1:4317"
{{- end }}
Expand Down Expand Up @@ -526,7 +529,7 @@ The scope passed in is expected to be a dict with keys
{{- $component := .componentConfig -}}
{{- $probes := mergeOverwrite ( $global.probes | deepCopy ) ( $component.probes | default dict | deepCopy ) -}}
{{- $deprecatedLivenessProbeInitialDelaySeconds := default .dot.Values.livenessProbeInitialDelaySeconds .componentConfig.livenessProbeInitialDelaySeconds -}}
{{- $deprecatedReadinessProbeInitialDelaySeconds := default .dot.Values.readinessProbeInitialDelaySeconds .componentConfig.readinessProbeInitialDelaySeconds -}}
{{- $deprecatedReadinessProbeInitialDelaySeconds := default .dot.Values.readinessProbeInitialDelaySeconds .componentConfig.readinessProbeInitialDelaySeconds -}}
livenessProbe:
httpGet:
path: {{ $probes.livenessProbe.httpGet.path }}
Expand Down Expand Up @@ -604,22 +607,22 @@ The scope passed in is expected to be a dict with keys
{{- if ( ne $keySecretName "none" ) }}
- name: "tls-keys"
secret:
secretName: {{ ternary ( printf "%s-%s-example-keys" .dot.Release.Name .name ) $keySecretName ( eq $keySecretName "example" ) | quote }}
secretName: {{ ternary ( printf "%s-%s-example-keys" ( include "hono.fullname" . ) .name ) $keySecretName ( eq $keySecretName "example" ) | quote }}
{{- end }}
{{- $trustStoreConfigMapName := ( default "none" .componentConfig.tlsTrustStoreConfigMap | toString ) }}
{{- if ( ne $trustStoreConfigMapName "none" ) }}
- name: "tls-trust-store"
configMap:
name: {{ ternary ( printf "%s-example-trust-store" .dot.Release.Name ) $trustStoreConfigMapName ( eq $trustStoreConfigMapName "example" ) | quote }}
name: {{ ternary ( printf "%s-example-trust-store" ( include "hono.fullname" . )) $trustStoreConfigMapName ( eq $trustStoreConfigMapName "example" ) | quote }}
{{- end }}
- name: "default-logging-config"
configMap:
name: {{ printf "%s-default-logging-config" .dot.Release.Name | quote }}
name: {{ printf "%s-default-logging-config" ( include "hono.fullname" . ) | quote }}
optional: true
{{- $volumeName := printf "%s-conf" .name }}
- name: {{ $volumeName | quote }}
secret:
secretName: {{ printf "%s-%s" .dot.Release.Name $volumeName | quote }}
secretName: {{ printf "%s-%s" ( include "hono.fullname" . ) $volumeName | quote }}
{{- if and .dot.Values.otelCollectorAgentConfigMap ( not .dot.Values.jaegerBackendExample.enabled ) }}
- name: "otel-collector-config"
configMap:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ spec:
termination: passthrough
to:
kind: Service
name: {{ .Release.Name }}-dispatch-router-ext
name: {{ printf "%s-dispatch-router-ext" ( include "hono.fullname" $args ) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metadata:
type: Opaque
stringData:
"qdrouterd.json": |
{{- $_ := set $ "dot" $args.dot }}
{{- tpl ( .Files.Get "config/router/qdrouterd.json" ) . | nindent 4 }}
"broker-password": {{ .Values.amqpMessagingNetworkExample.broker.saslPassword }}
{{- end }}
3 changes: 2 additions & 1 deletion charts/hono/templates/example-data-grid/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ metadata:
{{- include "hono.metadata" $args | nindent 2 }}
data:
hono-data-grid.xml: |
{{- tpl ( .Files.Get "config/infinispan/hono-data-grid.xml" ) . | nindent 4 }}
{{- $_ := set $ "dot" $args.dot }}
{{- tpl ( .Files.Get "config/infinispan/hono-data-grid.xml" ) $ | nindent 4 }}
users.properties: |
{{ printf "%s=%s" .Values.dataGridExample.authUsername .Values.dataGridExample.authPassword }}
public-groups.properties: |
Expand Down
6 changes: 3 additions & 3 deletions charts/hono/templates/example-data-grid/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata:
{{- include "hono.metadata" $args | nindent 2 }}
spec:
replicas: 1
serviceName: {{ printf "%s-%s" .Release.Name $args.name }}
serviceName: {{ printf "%s-%s" (include "hono.fullname" $args) $args.name }}
selector:
matchLabels:
{{- include "hono.matchLabels" $args | nindent 6 }}
Expand All @@ -43,7 +43,7 @@ spec:
- name: JDK_JAVA_OPTIONS
value: "-XX:MinRAMPercentage=85 -XX:MaxRAMPercentage=85"
- name: JAVA_OPTIONS
value: {{ printf "-Djgroups.dns.query=%s-%s" .Release.Name $args.name }}
value: {{ printf "-Djgroups.dns.query=%s-%s" (include "hono.fullname" $args) $args.name }}
ports:
- name: hotrod
containerPort: 11222
Expand Down Expand Up @@ -74,5 +74,5 @@ spec:
volumes:
- name: conf
configMap:
name: {{ printf "%s-%s-conf" .Release.Name $args.name }}
name: {{ printf "%s-%s-conf" (include "hono.fullname" $args) $args.name }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ spec:
targetPort: amqp
to:
kind: Service
name: {{ .Release.Name }}-adapter-amqp
name: {{ printf "%s-adapter-amqp" ( include "hono.fullname" $args ) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ spec:
termination: passthrough
to:
kind: Service
name: {{ .Release.Name }}-adapter-amqp
name: {{ printf "%s-adapter-amqp" ( include "hono.fullname" $args ) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ spec:
targetPort: http
to:
kind: Service
name: {{ .Release.Name }}-adapter-http
name: {{ printf "%s-adapter-http" ( include "hono.fullname" $args ) }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ spec:
termination: passthrough
to:
kind: Service
name: {{ .Release.Name }}-adapter-http
name: {{ printf "%s-adapter-http" ( include "hono.fullname" $args ) }}
{{- end }}
Loading