Skip to content

Commit

Permalink
Revert "Bump helm-toolkit to 0.2.78 (#2264)"
Browse files Browse the repository at this point in the history
This reverts commit 6457587.

Skip-Release-Notes
Related: ATMOSPHERE-630
Change-Id: Icb552eae158a27bb06ea21ebaaf9a9ddb454ebd0
  • Loading branch information
ricolin authored and mnaser committed Jan 19, 2025
1 parent 7607e5a commit 17fb7e9
Show file tree
Hide file tree
Showing 294 changed files with 451 additions and 9,991 deletions.
2 changes: 1 addition & 1 deletion .charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
openstack_helm_dependencies: &openstack_helm_dependencies
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
version: 0.2.78
version: 0.2.69

charts:
- name: barbican
Expand Down
2 changes: 1 addition & 1 deletion charts/barbican/charts/helm-toolkit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ name: helm-toolkit
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
version: 0.2.78
version: 0.2.69
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ limitations under the License.

{{/*
abstract: |
Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
'hostname1:port1,hostname2:port2,hostname3:port3',
Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
Expand Down Expand Up @@ -47,43 +46,14 @@ examples:
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- values: |
endpoints:
oslo_cache:
hosts:
default: memcached
host_fqdn_override:
default: null
statefulset:
name: openstack-memcached-memcached
replicas: 3
port:
memcache:
default: 11211
usage: |
{{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}

{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
{{- $type := index . 0 -}}
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
{{- $local := dict "endpointHosts" list -}}
{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
{{- if $ssMap -}}
{{- $endpointHostPrefix := $ssMap.name -}}
{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
{{- end -}}
{{- else -}}
{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
{{- end -}}
{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ return: |
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
{{- printf "%s" $endpointMap.path | default "" -}}
{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -708,10 +708,6 @@ spec:
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
{{- $vHosts = append $vHosts $alias_host }}
{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ except ImportError:
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
from sqlalchemy import text

# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
Expand Down Expand Up @@ -126,7 +125,7 @@ except:
# Delete DB
try:
with root_engine.connect() as connection:
connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
Expand All @@ -139,7 +138,7 @@ except:
# Delete DB User
try:
with root_engine.connect() as connection:
connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ except ImportError:
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
from sqlalchemy import text

# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
Expand Down Expand Up @@ -126,7 +125,7 @@ except:
# Create DB
try:
with root_engine.connect() as connection:
connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
Expand All @@ -140,10 +139,10 @@ except:
try:
with root_engine.connect() as connection:
connection.execute(
text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
user, password, mysql_x509)))
"CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
user, password, mysql_x509))
connection.execute(
text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
"GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,15 @@ RABBITMQ_ADMIN_USERNAME=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
awk -F'[//:]' '{print $5}' | \
sed 's/%/\\x/g' | \
xargs -0 printf "%b")
awk -F'[//:]' '{print $5}')

# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
awk -F'[//:]' '{print $5}' | \
sed 's/%/\\x/g' | \
xargs -0 printf "%b")
awk -F'[//:]' '{print $5}')

# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ return: |
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
app.kubernetes.io/name: {{ $application }}
app.kubernetes.io/component: {{ $component }}
app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
Expand Down

This file was deleted.

Loading

0 comments on commit 17fb7e9

Please sign in to comment.