Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
diocas committed Sep 1, 2023
1 parent b5542af commit facd819
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
5 changes: 0 additions & 5 deletions swan-cern/files/swan_config_cern.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import os, subprocess

import asyncio

from kubernetes_asyncio.client.models import (
V1EmptyDirVolumeSource,
V1EnvVar,
Expand All @@ -11,10 +9,8 @@
V1KeyToPath,
V1ObjectFieldSelector,
V1ObjectMeta,
V1PodSecurityContext,
V1Secret,
V1SecretVolumeSource,
V1SELinuxOptions,
V1Volume,
V1VolumeMount,
)
Expand Down Expand Up @@ -46,7 +42,6 @@ async def get_swan_user_pod(self):

async def _init_eos_secret(self):
username = self.spawner.user.name
user_uid = self.spawner.user_uid
eos_secret_name ='eos-tokens-%s' % username

try:
Expand Down
8 changes: 1 addition & 7 deletions swan-cern/files/swan_spark_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os, subprocess, time, pwd, jwt
import subprocess

from kubernetes_asyncio.client.models import (
V1EnvVar,
Expand All @@ -17,8 +17,6 @@

from kubernetes_asyncio.client.rest import ApiException

import swanspawner

"""
Class handling KubeSpawner.modify_pod_hook(spawner,pod) call
"""
Expand Down Expand Up @@ -116,10 +114,6 @@ def _init_spark_containers(self, hadoop_secret_name):
"""
notebook_container = self._get_pod_container('notebook')
side_container = self._get_pod_container('side-container')
username = self.spawner.user.name

pod_spec_containers = []
side_container_volume_mounts = []

if hadoop_secret_name:
# pod volume to mount generated hadoop tokens and
Expand Down
3 changes: 1 addition & 2 deletions swan/files/swan_config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import logging, os, subprocess
import logging

from kubernetes_asyncio.client.models import (
V1EmptyDirVolumeSource,
V1EnvVar,
V1HostPathVolumeSource,
V1PersistentVolumeClaimVolumeSource,
V1Volume,
Expand Down

0 comments on commit facd819

Please sign in to comment.