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

Swtich component sync deployment, deploy it as container app job #771

Merged
merged 1 commit into from
Oct 25, 2024
Merged
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
26 changes: 2 additions & 24 deletions image-sync/deployment/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ deploy-shared:
--set serviceAccountName=image-sync \
--set azureClientId=$${AZURE_SYNC_MI_CLIENT_ID}

# deploy-component-sync:
# AZURE_SYNC_MI_CLIENT_ID=$(shell az identity show \
# -g ${RESOURCEGROUP} \
# -n image-sync \
# --query clientId) && \
# TENANT_ID=$(shell az account show --query tenantId --output tsv) && \
# helm upgrade --force --install component-sync-cronjob ./componentSyncCronjob \
# --namespace ${NAMESPACE} --create-namespace \
# --set serviceAccountName=image-sync \
# --set azureClientId=$${AZURE_SYNC_MI_CLIENT_ID} \
# --set acrRegistryName=${ARO_HCP_IMAGE_ACR} \
# --set azureTenantId=$${TENANT_ID} \
# --set componentSyncImage="arohcpdev.azurecr.io/image-sync/component-sync" \
# --set componentSyncTag=latest \
# --set credsBearerSecret=bearer-secret \
# --set credsPullSecret=component-pull-secret \
# --set credsKeyVaultName=service-kv-aro-hcp-dev \
# --set repositories=${REPOSITORIES_TO_SYNC}

deploy-oc-mirror:
AZURE_SYNC_MI_CLIENT_ID=$(shell az identity show \
-g ${RESOURCEGROUP} \
Expand All @@ -55,13 +36,10 @@ deploy: deploy-shared deploy-component-sync deploy-oc-mirror
undeploy-shared:
helm uninstall shared-resources --namespace ${NAMESPACE}

undeploy-component-sync:
helm uninstall component-sync-cronjob --namespace ${NAMESPACE}

undeploy-oc-mirror:
helm uninstall oc-mirror-cronjob --namespace ${NAMESPACE}

undeploy: undeploy-shared undeploy-component-sync undeploy-oc-mirror
undeploy: undeploy-shared undeploy-oc-mirror

deploy-component-sync:
az deployment group create --name comp-sync \
Expand All @@ -70,4 +48,4 @@ deploy-component-sync:
--parameters componentSync/mvp-component-sync.bicepparam \
--parameters containerImage="arohcpdev.azurecr.io/image-sync/component-sync:latest"

.PHONY: deploy-component-sync deploy-shared deploy-oc-mirror undeploy-shared undeploy-component-sync undeploy-oc-mirror
.PHONY: deploy-component-sync deploy-shared deploy-oc-mirror undeploy-shared undeploy-oc-mirror
6 changes: 5 additions & 1 deletion image-sync/deployment/componentSync/component-sync.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ resource symbolicname 'Microsoft.App/jobs@2024-03-01' = {
environmentId: containerAppEnvironment.id
configuration: {
eventTriggerConfig: {}
triggerType: 'Manual'
triggerType: 'Schedule'
scheduleTriggerConfig: {
cronExpression: '*/5 * * * *'
parallelism: 1
}
replicaTimeout: 60 * 60
registries: [
{
Expand Down
7 changes: 0 additions & 7 deletions image-sync/deployment/componentSyncCronjob/Chart.yaml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions image-sync/deployment/componentSyncCronjob/values.yaml

This file was deleted.

Loading