diff --git a/dist/index.js b/dist/index.js index 2f19c513..049be531 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 66522ba5..728f872e 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/model/cloud-runner/providers/k8s/kubernetes-log-service.ts b/src/model/cloud-runner/providers/k8s/kubernetes-log-service.ts index 1724b489..b322b279 100644 --- a/src/model/cloud-runner/providers/k8s/kubernetes-log-service.ts +++ b/src/model/cloud-runner/providers/k8s/kubernetes-log-service.ts @@ -21,32 +21,10 @@ class KubernetesLogService { } static async createLogDeployment(namespace: string, kubeClient: k8s.AppsV1Api, kubeClientCore: CoreV1Api) { - // json - /* - apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - creationTimestamp: null - labels: - service: http-fileserver - name: http-fileserver -spec: - replicas: 1 - strategy: {} - template: - metadata: - creationTimestamp: null - labels: - service: http-fileserver - spec: - containers: - - image: pgaertig/nginx-big-upload:latest - imagePullPolicy: Always - name: http-fileserver - resources: {} - restartPolicy: Always -status: {} - */ + if (!process.env.LOG_SERVICE_IP) { + return `0.0.0.0`; + } + // create a deployment with above json const deployment = new k8s.V1Deployment(); deployment.apiVersion = 'apps/v1'; @@ -126,7 +104,7 @@ status: {} continue; } - const logs = await CloudRunnerSystem.Run(`kubectl logs ${podname} -f --timestamps`, false, true); + const logs = await CloudRunnerSystem.Run(`kubectl logs ${podname} -f --timestamps -p`, false, true); CloudRunnerLogger.log(`Logs: ${logs}`); // get cluster ip @@ -143,27 +121,6 @@ status: {} // create kubernetes service to expose deployment static async createLogServiceExpose(namespace: string, kubeClient: CoreV1Api) { - // json - /* - apiVersion: v1 - kind: Service - metadata: - creationTimestamp: null - labels: - service: http-fileserver - name: http-fileserver - spec: - ports: - - name: 80-80 - port: 80 - protocol: TCP - targetPort: 80 - selector: - service: http-fileserver - type: LoadBalancer - status: - loadBalancer: {} - */ // create a service with above json const service = new k8s.V1Service(); service.apiVersion = 'v1';