Skip to content
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
21 changes: 10 additions & 11 deletions frontend/src/__mocks__/mockNotebookK8sResource.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -188,34 +188,33 @@ export const mockNotebookK8sResource = ({
},
},
],
image:
'registry.redhat.io/openshift4/ose-oauth-proxy@sha256:4bef31eb993feb6f1096b51b4876c65a6fb1f4401fee97fa4f4542b6b7c9bc46',
image: 'quay.io/openshift/kube-rbac-proxy:latest',
imagePullPolicy: 'Always',
livenessProbe: {
failureThreshold: 3,
httpGet: {
path: '/oauth/healthz',
port: 'oauth-proxy',
path: '/healthz',
port: 'kube-rbac-proxy',
scheme: 'HTTPS',
},
initialDelaySeconds: 30,
periodSeconds: 5,
successThreshold: 1,
timeoutSeconds: 1,
},
name: 'oauth-proxy',
name: 'kube-rbac-proxy',
ports: [
{
containerPort: 8443,
name: 'oauth-proxy',
name: 'kube-rbac-proxy',
protocol: 'TCP',
},
],
readinessProbe: {
failureThreshold: 3,
httpGet: {
path: '/oauth/healthz',
port: 'oauth-proxy',
path: '/healthz',
port: 'kube-rbac-proxy',
scheme: 'HTTPS',
},
initialDelaySeconds: 5,
Expand All @@ -235,8 +234,8 @@ export const mockNotebookK8sResource = ({
},
volumeMounts: [
{
mountPath: '/etc/oauth/config',
name: 'oauth-config',
mountPath: '/etc/kube-rbac-proxy',
name: 'kube-rbac-proxy-config',
},
{
mountPath: '/etc/tls/private',
Expand Down Expand Up @@ -267,7 +266,7 @@ export const mockNotebookK8sResource = ({
},
},
{
name: 'oauth-config',
name: 'kube-rbac-proxy-config',
secret: {
secretName: 'workbench-oauth-config',
},
Expand Down
21 changes: 10 additions & 11 deletions frontend/src/__mocks__/mockPodK8sResource.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const mockPodK8sResource = ({
},
},
{
name: 'oauth-config',
name: 'kube-rbac-proxy-config',
secret: {
secretName: `${name}-oauth-config`,
},
Expand Down Expand Up @@ -162,12 +162,11 @@ export const mockPodK8sResource = ({
imagePullPolicy: 'Always',
},
{
name: 'oauth-proxy',
image:
'registry.redhat.io/openshift4/ose-oauth-proxy@sha256:4bef31eb993feb6f1096b51b4876c65a6fb1f4401fee97fa4f4542b6b7c9bc46',
name: 'kube-rbac-proxy',
image: 'quay.io/openshift/kube-rbac-proxy:latest',
ports: [
{
name: 'oauth-proxy',
name: 'kube-rbac-proxy',
containerPort: 8443,
protocol: 'TCP',
},
Expand Down Expand Up @@ -195,8 +194,8 @@ export const mockPodK8sResource = ({
},
volumeMounts: [
{
name: 'oauth-config',
mountPath: '/etc/oauth/config',
name: 'kube-rbac-proxy-config',
mountPath: '/etc/kube-rbac-proxy',
},
{
name: 'tls-certificates',
Expand All @@ -209,8 +208,8 @@ export const mockPodK8sResource = ({
],
livenessProbe: {
httpGet: {
path: '/oauth/healthz',
port: 'oauth-proxy',
path: '/healthz',
port: 'kube-rbac-proxy',
scheme: 'HTTPS',
},
initialDelaySeconds: 30,
Expand All @@ -221,8 +220,8 @@ export const mockPodK8sResource = ({
},
readinessProbe: {
httpGet: {
path: '/oauth/healthz',
port: 'oauth-proxy',
path: '/healthz',
port: 'kube-rbac-proxy',
scheme: 'HTTPS',
},
initialDelaySeconds: 5,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/api/k8s/__tests__/notebooks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ describe('removeNotebookPVC', () => {
claimName: 'test-storage-1',
},
},
{ name: 'oauth-config', secret: { secretName: 'workbench-oauth-config' } },
{ name: 'kube-rbac-proxy-config', secret: { secretName: 'workbench-oauth-config' } },
{ name: 'tls-certificates', secret: { secretName: 'workbench-tls' } },
],
},
Expand Down Expand Up @@ -1209,7 +1209,7 @@ describe('removeNotebookPVC', () => {
claimName: 'test-storage-1',
},
},
{ name: 'oauth-config', secret: { secretName: 'workbench-oauth-config' } },
{ name: 'kube-rbac-proxy-config', secret: { secretName: 'workbench-oauth-config' } },
{ name: 'tls-certificates', secret: { secretName: 'workbench-tls' } },
],
},
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/concepts/__tests__/StartNotebookModal.spec.tsx
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ describe('Start Notebook modal', () => {
expect(steps[5]).toHaveTextContent('Workbench image pulled');
expect(steps[6]).toHaveTextContent('Workbench container created');
expect(steps[7]).toHaveTextContent('Workbench container started');
expect(steps[8]).toHaveTextContent('Pulling oauth proxy');
expect(steps[9]).toHaveTextContent('Oauth proxy pulled');
expect(steps[10]).toHaveTextContent('Oauth proxy container created');
expect(steps[11]).toHaveTextContent('Oauth proxy container started');
expect(steps[8]).toHaveTextContent('Pulling auth proxy');
expect(steps[9]).toHaveTextContent('Auth proxy pulled');
expect(steps[10]).toHaveTextContent('Auth proxy container created');
expect(steps[11]).toHaveTextContent('Auth proxy container started');
expect(steps[12]).toHaveTextContent('Workbench started');
});

Expand Down Expand Up @@ -97,7 +97,7 @@ describe('Start Notebook modal', () => {
expect(header).toHaveTextContent('Workbench statusStarting');

const statusLabel = screen.getByTestId('notebook-latest-status');
expect(statusLabel).toHaveTextContent('Pulling oauth proxy');
expect(statusLabel).toHaveTextContent('Pulling auth proxy');

// Validate the steps
const stepper = screen.getByTestId('notebook-startup-steps');
Expand Down
36 changes: 16 additions & 20 deletions frontend/src/concepts/__tests__/mockNotebookStates.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -98,34 +98,33 @@ const notebook: NotebookKind = {
},
},
],
image:
'registry.redhat.io/openshift4/ose-oauth-proxy@sha256:4f8d66597feeb32bb18699326029f9a71a5aca4a57679d636b876377c2e95695',
image: 'quay.io/openshift/kube-rbac-proxy:latest',
imagePullPolicy: 'Always',
livenessProbe: {
failureThreshold: 3,
httpGet: {
path: '/oauth/healthz',
port: 'oauth-proxy',
path: '/healthz',
port: 'kube-rbac-proxy',
scheme: 'HTTPS',
},
initialDelaySeconds: 30,
periodSeconds: 5,
successThreshold: 1,
timeoutSeconds: 1,
},
name: 'oauth-proxy',
name: 'kube-rbac-proxy',
ports: [
{
containerPort: 8443,
name: 'oauth-proxy',
name: 'kube-rbac-proxy',
protocol: 'TCP',
},
],
readinessProbe: {
failureThreshold: 3,
httpGet: {
path: '/oauth/healthz',
port: 'oauth-proxy',
path: '/healthz',
port: 'kube-rbac-proxy',
scheme: 'HTTPS',
},
initialDelaySeconds: 5,
Expand All @@ -145,8 +144,8 @@ const notebook: NotebookKind = {
},
volumeMounts: [
{
mountPath: '/etc/oauth/config',
name: 'oauth-config',
mountPath: '/etc/kube-rbac-proxy',
name: 'kube-rbac-proxy-config',
},
{
mountPath: '/etc/tls/private',
Expand Down Expand Up @@ -364,10 +363,9 @@ export const mockFailedStates = {
};

const inProgressNotebookStatus: NotebookStatus = {
currentEvent: 'Pulling oauth proxy',
currentEvent: 'Pulling auth proxy',
currentEventReason: 'Pulling',
currentEventDescription:
'Pulling image "registry.redhat.io/openshift4/ose-oauth-proxy@sha256:4f8d66597feeb32bb18699326029f9a71a5aca4a57679d636b876377c2e95695"',
currentEventDescription: 'Pulling image "quay.io/openshift/kube-rbac-proxy:latest"',
currentStatus: EventStatus.SUCCESS,
};

Expand Down Expand Up @@ -502,8 +500,7 @@ const inProgressNotebookEvents: EventKind[] = [
involvedObject: {
name: 'new-pipeline-0',
},
message:
'Pulling image "registry.redhat.io/openshift4/ose-oauth-proxy@sha256:4f8d66597feeb32bb18699326029f9a71a5aca4a57679d636b876377c2e95695"',
message: 'Pulling image "quay.io/openshift/kube-rbac-proxy:latest"',
eventTime: '2025-01-22T20:18:58Z',
metadata: {
name: 'new-pipeline-0.181d1d3386caf5de',
Expand Down Expand Up @@ -576,7 +573,7 @@ const completedNotebookEvents: EventKind[] = [
involvedObject: {
name: 'new-pipeline-0',
},
message: 'Created container oauth-proxy',
message: 'Created container kube-rbac-proxy',
eventTime: '2025-01-22T20:18:58Z',
metadata: {
name: 'new-pipeline-0.181d1d33a9a163cd',
Expand All @@ -592,7 +589,7 @@ const completedNotebookEvents: EventKind[] = [
name: 'new-pipeline-0',
},
message:
'Successfully pulled image "registry.redhat.io/openshift4/ose-oauth-proxy@sha256:4f8d66597feeb32bb18699326029f9a71a5aca4a57679d636b876377c2e95695" in 364.698388ms (364.711132ms including waiting)',
'Successfully pulled image "quay.io/openshift/kube-rbac-proxy:latest" in 364.698388ms (364.711132ms including waiting)',
eventTime: '2025-01-22T20:18:58Z',
metadata: {
name: 'new-pipeline-0.181d1d339c883533',
Expand All @@ -607,8 +604,7 @@ const completedNotebookEvents: EventKind[] = [
involvedObject: {
name: 'new-pipeline-0',
},
message:
'Pulling image "registry.redhat.io/openshift4/ose-oauth-proxy@sha256:4f8d66597feeb32bb18699326029f9a71a5aca4a57679d636b876377c2e95695"',
message: 'Pulling image "quay.io/openshift/kube-rbac-proxy:latest"',
eventTime: '2025-01-22T20:18:58Z',
metadata: {
name: 'new-pipeline-0.181d1d3386caf5de',
Expand Down Expand Up @@ -685,7 +681,7 @@ const completedNotebookEvents: EventKind[] = [
involvedObject: {
name: 'new-pipeline-0',
},
message: 'Started container oauth-proxy',
message: 'Started container kube-rbac-proxy',
eventTime: '2025-01-22T20:18:58Z',
metadata: {
name: 'new-pipeline-0.181d1d33aa50e084',
Expand Down
30 changes: 15 additions & 15 deletions frontend/src/types.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,11 @@ export enum ProgressionStep {
NOTEBOOK_CONTAINER_CREATED = 'NOTEBOOK_CONTAINER_CREATED',
NOTEBOOK_CONTAINER_PROBLEM = 'NOTEBOOK_CONTAINER_PROBLEM',
NOTEBOOK_CONTAINER_STARTED = 'NOTEBOOK_CONTAINER_STARTED',
PULLING_OAUTH = 'PULLING_OAUTH',
OAUTH_PULLED = 'OAUTH_PULLED',
OAUTH_CONTAINER_CREATED = 'OAUTH_CONTAINER_CREATED',
OAUTH_CONTAINER_PROBLEM = 'OAUTH_CONTAINER_PROBLEM',
OAUTH_CONTAINER_STARTED = 'OAUTH_CONTAINER_STARTED',
PULLING_AUTH_PROXY = 'PULLING_AUTH_PROXY',
AUTH_PROXY_PULLED = 'AUTH_PROXY_PULLED',
AUTH_PROXY_CONTAINER_CREATED = 'AUTH_PROXY_CONTAINER_CREATED',
AUTH_PROXY_CONTAINER_PROBLEM = 'AUTH_PROXY_CONTAINER_PROBLEM',
AUTH_PROXY_CONTAINER_STARTED = 'AUTH_PROXY_CONTAINER_STARTED',
WORKBENCH_STARTED = 'WORKBENCH_STARTED',
}

Expand All @@ -715,11 +715,11 @@ export const ProgressionStepTitles: Record<ProgressionStep, string> = {
[ProgressionStep.NOTEBOOK_CONTAINER_CREATED]: 'Workbench container created',
[ProgressionStep.NOTEBOOK_CONTAINER_PROBLEM]: 'There was a problem with the workbench',
[ProgressionStep.NOTEBOOK_CONTAINER_STARTED]: 'Workbench container started',
[ProgressionStep.PULLING_OAUTH]: 'Pulling oauth proxy',
[ProgressionStep.OAUTH_PULLED]: 'Oauth proxy pulled',
[ProgressionStep.OAUTH_CONTAINER_CREATED]: 'Oauth proxy container created',
[ProgressionStep.OAUTH_CONTAINER_PROBLEM]: 'There was a problem with Oauth',
[ProgressionStep.OAUTH_CONTAINER_STARTED]: 'Oauth proxy container started',
[ProgressionStep.PULLING_AUTH_PROXY]: 'Pulling auth proxy',
[ProgressionStep.AUTH_PROXY_PULLED]: 'Auth proxy pulled',
[ProgressionStep.AUTH_PROXY_CONTAINER_CREATED]: 'Auth proxy container created',
[ProgressionStep.AUTH_PROXY_CONTAINER_PROBLEM]: 'There was a problem with auth proxy',
[ProgressionStep.AUTH_PROXY_CONTAINER_STARTED]: 'Auth proxy container started',
[ProgressionStep.WORKBENCH_STARTED]: 'Workbench started',
};

Expand All @@ -729,10 +729,10 @@ export const AssociatedSteps: { [key in ProgressionStep]?: ProgressionStep[] } =
ProgressionStep.PULLING_NOTEBOOK_IMAGE,
ProgressionStep.NOTEBOOK_IMAGE_PULLED,
],
[ProgressionStep.OAUTH_CONTAINER_STARTED]: [
ProgressionStep.PULLING_OAUTH,
ProgressionStep.OAUTH_PULLED,
ProgressionStep.OAUTH_CONTAINER_CREATED,
[ProgressionStep.AUTH_PROXY_CONTAINER_STARTED]: [
ProgressionStep.PULLING_AUTH_PROXY,
ProgressionStep.AUTH_PROXY_PULLED,
ProgressionStep.AUTH_PROXY_CONTAINER_CREATED,
],
[ProgressionStep.POD_ASSIGNED]: [ProgressionStep.POD_CREATED],
[ProgressionStep.WORKBENCH_STARTED]: Object.values(ProgressionStep),
Expand All @@ -741,7 +741,7 @@ export const AssociatedSteps: { [key in ProgressionStep]?: ProgressionStep[] } =
export const OptionalSteps: ProgressionStep[] = [
ProgressionStep.POD_PROBLEM,
ProgressionStep.NOTEBOOK_CONTAINER_PROBLEM,
ProgressionStep.OAUTH_CONTAINER_PROBLEM,
ProgressionStep.AUTH_PROXY_CONTAINER_PROBLEM,
ProgressionStep.PVC_ATTACHED,
];

Expand Down
Loading
Loading