Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>
  • Loading branch information
fabianvf committed Aug 19, 2024
1 parent b2f373c commit 06f93f6
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 14 deletions.
2 changes: 2 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ spec:
value: {{ .Values.images.provider_generic }}
- name: RELATED_IMAGE_PROVIDER_JAVA
value: {{ .Values.images.provider_java }}
- name: RELATED_IMAGE_KAI
value: {{ .Values.images.kai }}
name: tackle-operator
image: {{ .Values.images.operator }}
imagePullPolicy: Always
Expand Down
3 changes: 2 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ images:
addon_analyzer: quay.io/konveyor/tackle2-addon-analyzer:latest
addon_discovery: quay.io/konveyor/tackle2-addon-discovery:latest
provider_generic: quay.io/konveyor/generic-external-provider:latest
provider_java: quay.io/konveyor/java-external-provider:latest
provider_java: quay.io/konveyor/java-external-provider:latest
kai: quay.io/konveyor/kai:latest
1 change: 1 addition & 0 deletions roles/tackle/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,4 @@ kai_database_image_fqin: "{{ keycloak_database_image_fqin }}"
kai_database_secret_name: kai-db-secret
kai_database_volume_size: "10Gi"
kai_database_volume_claim_name: "{{ hub_service_name }}-kai-database-volume-claim"
kai_database_address: kai-db.{{ app_namespace }}.svc
2 changes: 1 addition & 1 deletion roles/tackle/tasks/kai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
name: "{{ kai_database_secret_name }}"
namespace: "{{ app_namespace }}"
stringData:
POSTGRES_HOST: kai-db
POSTGRES_HOST: "{{ kai_database_address }}"
POSTGRES_DB: kai
POSTGRES_PASSWORD: "{{ pg_password }}"
POSTGRES_USER: kai
Expand Down
7 changes: 6 additions & 1 deletion roles/tackle/templates/kai/kai-api-deployment.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ spec:
spec:
containers:
- name: kai-api
# TODO: Update image variable
image: "{{ kai_fqin }}"
ports:
- containerPort: 8080
Expand Down Expand Up @@ -53,21 +52,27 @@ spec:
value: "8"
- name: USE_HUB_IMPORTER
value: "True"
{% if kai_api_key_secret_status.resources.0.data[kai_bam_secret_key]|default(false) %}
- name: GENAI_KEY
valueFrom:
secretKeyRef:
name: "{{ kai_api_key_secret_name }}"
key: "{{ kai_bam_secret_key }}"
{% endif %}
{% if kai_api_key_secret_status.resources.0.data[kai_openai_secret_base_key]|default(false) %}
- name: OPENAI_API_BASE
valueFrom:
secretKeyRef:
name: "{{ kai_api_key_secret_name }}"
key: "{{ kai_openai_secret_base_key }}"
{% endif %}
{% if kai_api_key_secret_status.resources.0.data[kai_openai_secret_api_key]|default(false) %}
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: "{{ kai_api_key_secret_name }}"
key: "{{ kai_openai_secret_api_key }}"
{% endif %}
volumeMounts:
- name: config-volume
mountPath: /podman_compose/kai-config.toml
Expand Down
2 changes: 1 addition & 1 deletion roles/tackle/templates/kai/kai-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
data:
kai-config.toml: |
# TODO: Make all these configurable via ansible
log_level = "{{ kai_loglevel }}"
log_level = "{{ kai_log_level }}"
file_log_level = "debug"
log_dir = "/podman_compose/logs"
demo_mode = {{ kai_enable_demo_mode }}
Expand Down
8 changes: 4 additions & 4 deletions roles/tackle/templates/kai/kai-db-deployment.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ spec:
spec:
containers:
- name: kai-db
image: "{{ kai_fqin }}"
image: "{{ kai_database_image_fqin }}"
env:
- name: POSTGRES_DB
- name: POSTGRESQL_DATABASE
valueFrom:
secretKeyRef:
name: "{{ kai_db_secret_name }}"
key: POSTGRES_DB
- name: POSTGRES_PASSWORD
- name: POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
name: "{{ kai_db_secret_name }}"
key: POSTGRES_PASSWORD
- name: POSTGRES_USER
- name: POSTGRESQL_USER
valueFrom:
secretKeyRef:
name: "{{ kai_db_secret_name }}"
Expand Down
18 changes: 12 additions & 6 deletions roles/tackle/templates/kai/kai-importer-deployment.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: kai-hub-importer
image: "{{ kai_dqin }}"
image: "{{ kai_fqin }}"
env:
- name: POSTGRES_HOST
valueFrom:
Expand Down Expand Up @@ -52,26 +52,32 @@ spec:
value: "True"
- name: MODE
value: "importer"
- name: JWT
valueFrom:
secretKeyRef:
name: "{{ kai_jwt_secret_name }}"
key: jwt
{% if kai_api_key_secret_status.resources.0.data[kai_bam_secret_key]|default(false) %}
- name: GENAI_KEY
valueFrom:
secretKeyRef:
name: "{{ kai_api_key_secret_name }}"
key: "{{ kai_bam_secret_key }}"
{% endif %}
{% if kai_api_key_secret_status.resources.0.data[kai_openai_secret_base_key]|default(false) %}
- name: OPENAI_API_BASE
valueFrom:
secretKeyRef:
name: "{{ kai_api_key_secret_name }}"
key: "{{ kai_openai_secret_base_key }}"
{% endif %}
{% if kai_api_key_secret_status.resources.0.data[kai_openai_secret_api_key]|default(false) %}
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: "{{ kai_api_key_secret_name }}"
key: "{{ kai_openai_secret_api_key }}"
- name: JWT
valueFrom:
secretKeyRef:
name: "{{ kai_jwt_secret_name }}"
key: jwt
{% endif %}
volumeMounts:
- name: config-volume
mountPath: /podman_compose/kai-config.toml
Expand Down

0 comments on commit 06f93f6

Please sign in to comment.