Skip to content
Open
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 api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:24.04 AS python-builder

RUN apt-get update && \
apt-get install -y git python3 python3-venv && \
apt-get install --no-install-recommends --no-install-suggests -y git python3 python3-venv && \
rm -rf /var/lib/apt/lists/*

RUN python3 -m venv /venv && \
Expand Down
16 changes: 7 additions & 9 deletions api/azimuth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1426,12 +1426,11 @@ def cluster_service(request, tenant, cluster, service):
service_fqdn = None
service_label = None
try:
if cloud_settings.CLUSTER_ENGINE:
with request.auth.scoped_session(tenant) as session:
with cloud_settings.CLUSTER_ENGINE.create_manager(
session
) as cluster_manager:
cluster = cluster_manager.find_cluster(cluster)
with request.auth.scoped_session(tenant) as session:
with cloud_settings.CLUSTER_ENGINE.create_manager(
session
) as cluster_manager:
cluster = cluster_manager.find_cluster(cluster)
service_obj = next(s for s in cluster.services if s.name == service)
service_fqdn = service_obj.fqdn
service_label = service_obj.label
Expand Down Expand Up @@ -1834,9 +1833,8 @@ def kubernetes_cluster_service(request, tenant, cluster, service):
service_fqdn = None
service_label = None
try:
if cloud_settings.CLUSTER_API_PROVIDER:
with cloud_settings.CLUSTER_API_PROVIDER.session(session) as capi_session:
cluster = capi_session.find_cluster(cluster)
with cloud_settings.CLUSTER_API_PROVIDER.session(session) as capi_session:
cluster = capi_session.find_cluster(cluster)
service_obj = next(s for s in cluster.services if s.name == service)
service_fqdn = service_obj.fqdn
service_label = service_obj.label
Expand Down
4 changes: 0 additions & 4 deletions chart/files/api/settings/07-disable-kubernetes.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions chart/files/api/settings/07-feature-flags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if or (not .Values.tags.kubernetes) (not .Values.tags.clusters) -}}
AZIMUTH:
{{- if not .Values.tags.kubernetes }}
CLUSTER_API_PROVIDER: null
{{- end }}
{{- if not .Values.tags.clusters }}
CLUSTER_ENGINE: null
{{- end }}
{{- end }}
55 changes: 0 additions & 55 deletions chart/files/api/settings/08-awx.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions chart/files/api/settings/09-awx-passwords.py

This file was deleted.

4 changes: 0 additions & 4 deletions chart/files/api/settings/10-disable-caas.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions chart/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{- $component := "api" -}}
{{- $values := get .Values $component -}}
{{- $clusterEngine := .Values.clusterEngine -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -57,23 +56,8 @@ spec:
(eq .Values.authentication.type "oidc")
(hasPrefix "http://" .Values.authentication.oidc.issuerUrl)
)
(and .Values.tags.clusters (eq $clusterEngine.type "awx"))
}}
env:
{{- if and .Values.tags.clusters (eq $clusterEngine.type "awx") }}
- name: AWX_PASSWORD
valueFrom:
secretKeyRef:
name: {{ required "clusterEngine.awx.passwordSecretName is required" $clusterEngine.awx.passwordSecretName | quote }}
key: password
{{- with $clusterEngine.awx.adminPasswordSecretName }}
- name: AWX_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ quote . }}
key: password
{{- end }}
{{- end }}
{{- if $values.monitoring.enabled }}
- name: GUNICORN_STATSD_HOST
value: "localhost:9125"
Expand Down
12 changes: 3 additions & 9 deletions chart/templates/api/settings.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not (has .Values.clusterEngine.type (list "crd" "awx")) -}}
{{- if ne .Values.clusterEngine.type "crd" -}}
{{- fail (printf "Unsupported cluster engine '%s'" .Values.clusterEngine.type) }}
{{- end }}

Expand All @@ -23,14 +23,8 @@ data:
{{- tpl (.Files.Get "files/api/settings/05-apps.yaml") . | b64enc | nindent 4 }}
06-ssh-key-store.yaml: |
{{- tpl (.Files.Get "files/api/settings/06-ssh-key-store.yaml") . | b64enc | nindent 4 }}
07-disable-kubernetes.yaml: |
{{- tpl (.Files.Get "files/api/settings/07-disable-kubernetes.yaml") . | b64enc | nindent 4 }}
08-awx.yaml: |
{{- tpl (.Files.Get "files/api/settings/08-awx.yaml") . | b64enc | nindent 4 }}
09-awx-passwords.py: |
{{- tpl (.Files.Get "files/api/settings/09-awx-passwords.py") . | b64enc | nindent 4 }}
10-disable-caas.yaml: |
{{- tpl (.Files.Get "files/api/settings/10-disable-caas.yaml") . | b64enc | nindent 4 }}
07-feature-flags.yaml: |
{{- tpl (.Files.Get "files/api/settings/07-feature-flags.yaml") . | b64enc | nindent 4 }}
11-scheduling.yaml: |
{{- tpl (.Files.Get "files/api/settings/11-scheduling.yaml") . | b64enc | nindent 4 }}
12-apps-provider.yaml: |
Expand Down
10 changes: 2 additions & 8 deletions chart/tests/__snapshot__/snapshot_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ templated manifests should match snapshot:
template:
metadata:
annotations:
azimuth.stackhpc.com/settings-checksum: ba9764bba470b2cacf65a4646a795dd5a62707a4879baac5749a8884af5dc0cd
azimuth.stackhpc.com/settings-checksum: 65ccb797a35210f0ae53ea1af4483f357627b78cc7c97b321de04fb78bdd6ed8
azimuth.stackhpc.com/theme-checksum: ec0f36322392deee39d80b7f77ecd634df60358857af9dc208077860c4e174ab
kubectl.kubernetes.io/default-container: api
labels:
Expand Down Expand Up @@ -261,13 +261,7 @@ templated manifests should match snapshot:
Cg==
06-ssh-key-store.yaml: |
QVpJTVVUSDoKICBTU0hfS0VZX1NUT1JFOgogICAgRkFDVE9SWTogYXppbXV0aC5rZXlzdG9yZS5wcm92aWRlci5Qcm92aWRlcktleVN0b3JlCg==
07-disable-kubernetes.yaml: |
Cg==
08-awx.yaml: |
Cg==
09-awx-passwords.py: |
Cg==
10-disable-caas.yaml: |
07-feature-flags.yaml: |
QVpJTVVUSDoKICBDTFVTVEVSX0VOR0lORTogbnVsbAo=
11-scheduling.yaml: |
QVpJTVVUSDoKICBTQ0hFRFVMSU5HOgogICAgRU5BQkxFRDogZmFsc2UK
Expand Down
79 changes: 1 addition & 78 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,85 +314,8 @@ apps:

# The cluster engine to use for Cluster-as-a-Service support
clusterEngine:
# The type of cluster engine to use
# Currently only CRD is functional, and AWX support is deprecated
# The type of cluster engine to use (only crd is supported)
type: crd
# Parameters for the awx cluster engine
# By default, we use values that will work with the managed AWX
awx:
# The AWX or Ansible Tower URL
url:
# Whether to verify SSL with the AWX/Tower API
verifySsl: true
# The username to use for the AWX/Tower API
# This user must be at least an org admin for the CaaS organisation
username: admin
# The name of a secret to get the AWX password from
passwordSecretName:
# Indicates whether teams should be created automatically
createTeams: true
# Indicates whether automatically-created teams should be granted access
# to all cluster types
createTeamAllowAllPermission: true
# Indicates whether CaaS resources should be created in AWX
createResources: true
# Creating resources requires the admin user
# If the user specified above is not a global admin, a separate admin username and
# password secret should be specified
adminUsername:
adminPasswordSecretName:
# Definition of a custom execution environment for CaaS appliances
executionEnvironment:
# # The image to use for the execution environment (required)
# image: registry.example.com/azimuth/caas-ee:<tag>
# # Indicates if the image should be pulled for every job (defaults to false)
# # This can be useful in development, but in production the recommended method is
# # to set this to false and use immutable tags
# alwaysPull: false
# # Optional credentials if the image is in a private registry
# credentials:
# # The registry host
# host: registry.example.com
# # The username to use to authenticate
# username: <user>
# # The token/password to use to authenticate
# token: <registry token>
# Definition of the default projects and job templates.
# By default, the StackHPC demo appliances will be used
defaultProjects:
# - # The name of the project (required)
# name: My Site Appliances
# # The git URL of the project (required)
# gitUrl: https://github.com/myorg/site-appliances.git
# # The branch, tag or commit id to use (required)
# gitVersion: master
# # The base URL for cluster metadata files (required)
# metadataRoot: https://raw.githubusercontent.com/myorg/site-appliances/master/ui-meta
# ##
# # OPTIONAL KEYS
# ##
# # Indicates if the project should be updated to the latest version on each job launch
# # Can be useful during development but recommend to leave as false in production
# # Defaults to false if not given
# alwaysUpdate: true
# # List of playbooks to create job templates for
# # If not given, a job template is created for each playbook in the project
# playbooks: ['cluster1-playbook.yml', 'cluster2-playbook.yml']
# # Map whose keys are the playbooks and whose values are maps of Ansible extra_vars for those playbooks
# extraVars:
# # This special key can be used to set common extra_vars for all playbooks in a project
# __ALL__: { var1: value1, var2: value2 }
# cluster1-playbook.yml: { var1: "override value1" }
# Configuration for the Terraform backend
terraformBackend:
# Indicates if the Terraform backend should be configured
enabled: true
# The type of the Terraform backend to use (currently only consul is supported)
type: consul
# Configuration for the consul backend
consul:
# The address, including port, of the Consul server to use
address:

# The SSH key store to use
# The portal asks this store for the SSH key for a user
Expand Down
2 changes: 1 addition & 1 deletion ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FROM ubuntu:24.04 AS nginx-gpg-key
ENV NGINX_GPG_KEY="2FD21310B49F6B46"

RUN apt-get update && \
apt-get install -y gnupg2 && \
apt-get install --no-install-recommends --no-install-suggests -y gnupg2 && \
rm -rf /var/lib/apt/lists/*

RUN gpg2 --keyserver hkp://keyserver.ubuntu.com:80 --keyserver-options timeout=10 --recv-keys "$NGINX_GPG_KEY" && \
Expand Down
Loading