Skip to content

Commit

Permalink
feat: gitea operator setupGitea
Browse files Browse the repository at this point in the history
  • Loading branch information
ferruhcihan committed Jun 6, 2024
1 parent 6468443 commit 64dd3ba
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions src/operator/gitea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ async function setupGitea() {
async function runSetupGitea() {
try {
await setupGitea()
console.debug('Gitea setup/retries completed')
console.debug('Gitea setup/reconfiguration completed')
} catch (error) {
console.debug('Error could not run setup gitea', error)
console.debug('Retrying in 30 seconds')
Expand Down Expand Up @@ -380,36 +380,6 @@ export default class MyOperator extends Operator {
} catch (error) {
console.debug(error)
}
// Watch configmaps to check if gitea need to be updated
// try {
// await this.watchResource('', 'v1', 'configmaps', async (e) => {
// const { object }: { object: k8s.V1ConfigMap } = e
// const { metadata } = object
// // Check if namespace starts with prefix 'team-'
// if (metadata && !metadata.name?.startsWith('team-')) return
// if (metadata && metadata.name === 'team-admin') return
// await runSetupGitea()
// })
// } catch (error) {
// console.debug(error)
// }
// try {
// await this.watchResource('', 'v1', 'configmaps', async (e) => {
// const { object }: { object: k8s.V1ConfigMap } = e
// const { metadata } = object
// if (metadata?.namespace !== 'argocd-cm') return
// const { managedFields } = metadata
// if (
// managedFields &&
// managedFields.length > 0 &&
// (managedFields[0].operation === 'Update' || managedFields[0].operation === 'Create')
// ) {
// await runSetupGitea()
// }
// })
// } catch (error) {
// console.debug(error)
// }
}
}

Expand Down

0 comments on commit 64dd3ba

Please sign in to comment.