Skip to content

Commit

Permalink
fix: kc from cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderMatt committed Dec 13, 2023
1 parent e52b3d5 commit bf773c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/operator/gitea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import stream from 'stream'

interface ConditionCheckResult {
ready: boolean
pod: k8s.V1Pod // Replace 'Pod' with the type you have for your pod
pod: k8s.V1Pod
}

const kc = new KubeConfig()
kc.loadFromDefault()
kc.loadFromCluster()
const k8sApi = kc.makeApiClient(k8s.CoreV1Api)

function buildTeamString(teamNames: any[]): string {
Expand Down Expand Up @@ -109,7 +109,6 @@ async function checkGiteaContainer(): Promise<ConditionCheckResult> {
export default class MyOperator extends Operator {
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
protected async init() {
console.debug('Starting initializing')
// Watch all namespaces
try {
await this.watchResource('', 'v1', 'namespaces', async (e) => {
Expand Down

0 comments on commit bf773c3

Please sign in to comment.