Skip to content

Commit

Permalink
More ingress-nginx renaming.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gacko committed Jul 6, 2023
1 parent ad717f5 commit 4c3a340
Show file tree
Hide file tree
Showing 17 changed files with 69 additions and 81 deletions.
8 changes: 4 additions & 4 deletions __tests__/AppDetailPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('Installed app detail pane', () => {
fireEvent.click(appsTab);

// Click on app to open the editing modal
const appLabel = getByText(/chart version: 0.0.1/i);
const appLabel = getByText(/chart version: 3.0.0/i);
fireEvent.click(appLabel);

// Delete the existing file
Expand Down Expand Up @@ -151,7 +151,7 @@ describe('Installed app detail pane', () => {
fireEvent.click(appsTab);

// Click on app to open the editing modal
const appLabel = getByText(/chart version: 0.0.1/i);
const appLabel = getByText(/chart version: 3.0.0/i);
fireEvent.click(appLabel);

// Upload a configmap file
Expand Down Expand Up @@ -196,7 +196,7 @@ describe('Installed app detail pane', () => {
fireEvent.click(appsTab);

// Click on app to open the editing modal
const appLabel = getByText(/chart version: 0.0.1/i);
const appLabel = getByText(/chart version: 3.0.0/i);
fireEvent.click(appLabel);

// Upload a secrets file
Expand Down Expand Up @@ -254,7 +254,7 @@ describe('Installed app detail pane', () => {
fireEvent.click(appsTab);

// Click on app to open the editing modal
const appLabel = getByText(/chart version: 0.0.1/i);
const appLabel = getByText(/chart version: 3.0.0/i);
fireEvent.click(appLabel);

// Delete the existing file
Expand Down
24 changes: 12 additions & 12 deletions __tests__/Apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ describe('Apps and App Catalog', () => {
const app1 = await findByText('cert-manager-app');
expect(app1).toBeInTheDocument();

const app2 = await findByText('nginx-ingress-controller-app');
const app2 = await findByText('ingress-nginx');
expect(app2).toBeInTheDocument();
});

Expand All @@ -153,21 +153,21 @@ describe('Apps and App Catalog', () => {

const appDetailPath = RoutePath.createUsablePath(AppsRoutes.AppDetail, {
catalogName: 'giantswarm-incubator',
app: 'nginx-ingress-controller-app',
version: '1.1.1',
app: 'ingress-nginx',
version: '3.0.0',
});
const { findByText, findByTestId } = renderRouteWithStore(appDetailPath);

// The app's description should be there.
// This comes from parsing the index.yaml, which is mocked in catalogIndexResponse.
const appDescription = await findByText(
'A Helm chart for the nginx ingress-controller v1.1.1'
'A Helm chart for the Ingress NGINX Controller v3.0.0'
);
expect(appDescription).toBeInTheDocument();

const breadCrumbs = await findByTestId('breadcrumbs');
const appBreadCrumb = await within(breadCrumbs).findByText(
'NGINX-INGRESS-CONTROLLER-APP'
'INGRESS-NGINX'
);

expect(appBreadCrumb).toBeInTheDocument();
Expand All @@ -176,7 +176,7 @@ describe('Apps and App Catalog', () => {
it('installs an app in a cluster, with default settings', async () => {
nock(API_ENDPOINT)
.intercept(
`/v4/clusters/${V4_CLUSTER.id}/apps/nginx-ingress-controller-app/`,
`/v4/clusters/${V4_CLUSTER.id}/apps/ingress-nginx/`,
'PUT'
)
.reply(StatusCodes.Ok);
Expand Down Expand Up @@ -205,8 +205,8 @@ describe('Apps and App Catalog', () => {

const appDetailPath = RoutePath.createUsablePath(AppsRoutes.AppDetail, {
catalogName: 'giantswarm-incubator',
app: 'nginx-ingress-controller-app',
version: '1.1.1',
app: 'ingress-nginx',
version: '3.0.0',
});
const { findByText, getByText } = renderRouteWithStore(appDetailPath);

Expand Down Expand Up @@ -238,9 +238,9 @@ describe('Apps and App Catalog', () => {
.intercept(`/v4/clusters/${V4_CLUSTER.id}/apps/test-app/`, 'PUT', {
spec: {
catalog: 'giantswarm-incubator',
name: 'nginx-ingress-controller-app',
name: 'ingress-nginx',
namespace: 'test-app',
version: '1.1.1',
version: '3.0.0',
},
})
.reply(StatusCodes.Ok, installAppResponse);
Expand Down Expand Up @@ -271,8 +271,8 @@ describe('Apps and App Catalog', () => {
AppsRoutes.AppDetail,
{
catalogName: 'giantswarm-incubator',
app: 'nginx-ingress-controller-app',
version: '1.1.1',
app: 'ingress-nginx',
version: '3.0.0',
}
);
const { findByText, getByText, getByLabelText } =
Expand Down
2 changes: 1 addition & 1 deletion src/components/Cluster/ClusterDetail/Ingress/Ingress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Ingress: React.FC<React.PropsWithChildren<IIngressProps>> = ({
<Text>
{hasIngress
? 'These details help you to set up Ingress for exposing services in this cluster.'
: 'In order to expose services via Ingress, you must have external-dns and an Ingress controller installed. Giant Swarm provides the NGINX Ingress Controller as a managed app.'}
: 'In order to expose services via Ingress, you must have external-dns and an Ingress controller installed. Giant Swarm provides the Ingress NGINX Controller as a managed app.'}
</Text>

{hasIngress ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const InstallIngressButton: React.FC<
<>
This will install the{' '}
<StyledLink to={ingressAppDetailPath} href={ingressAppDetailPath}>
NGINX Ingress Controller app {ingressAppToInstall.version}
Ingress NGINX Controller app {ingressAppToInstall.version}
</StyledLink>{' '}
on cluster <ClusterIDLabel clusterID={clusterId} />
{clusterIsNotReady && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('Ingress', () => {

expect(await screen.findByText(/this will install/i)).toBeInTheDocument();
expect(
screen.getByText(/nginx ingress controller app \d\.\d\.\d/i)
screen.getByText(/Ingress NGINX Controller app \d\.\d\.\d/i)
).toBeInTheDocument();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ const defaultCluster = {

const icApp: IInstalledApp = {
metadata: {
name: 'nginx-ingress-controller-app',
name: 'ingress-nginx',
labels: {},
},
spec: {
catalog: 'giantswarm',
namespace: 'kube-system',
name: 'nginx-ingress-controller-app',
version: '1.6.9',
name: 'ingress-nginx',
version: '3.0.0',
user_config: {
configmap: {
name: '',
Expand Down Expand Up @@ -74,7 +74,7 @@ describe('InstallIngressButton', () => {

expect(await screen.findByText(/this will install/i)).toBeInTheDocument();
expect(
screen.getByText(/nginx ingress controller app \d\.\d\.\d/i)
screen.getByText(/Ingress NGINX Controller app \d\.\d\.\d/i)
).toBeInTheDocument();

const button = screen.getByRole('button', {
Expand Down Expand Up @@ -128,7 +128,7 @@ describe('InstallIngressButton', () => {
screen.queryByText(/ingress controller installed/i)
).not.toBeInTheDocument();
expect(
screen.queryByText(/this will install the nginx ingress controller app/i)
screen.queryByText(/this will install the Ingress NGINX Controller app/i)
).not.toBeInTheDocument();

const button = screen.getByRole('button', {
Expand All @@ -143,7 +143,7 @@ describe('InstallIngressButton', () => {

expect(await screen.findByText(/this will install/i)).toBeInTheDocument();
expect(
screen.getByText(/nginx ingress controller app \d\.\d\.\d/i)
screen.getByText(/Ingress NGINX Controller app \d\.\d\.\d/i)
).toBeInTheDocument();
expect(
screen.getByRole('progressbar', {
Expand Down
8 changes: 4 additions & 4 deletions src/components/GettingStarted/Steps/InstallIngress.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ const InstallIngress = (props) => {

<h3>Using the Giant Swarm App Platform</h3>
<p>
You can use our app platform to install the popular nginx ingress
controller. We provide a tuned implementation in the &quot;Giant Swarm
You can use our app platform to install the popular Ingress NGINX
Controller. We provide a tuned implementation in the &quot;Giant Swarm
Catalog&quot;, which you can browse by clicking &quot;App
Catalogs&quot; in the navigation above.
</p>

<p>
For convenience however, you can click on the &apos;Install Ingress
Controller&apos; button below to immediately install the nginx ingress
controller on your cluster.
Controller&apos; button below to immediately install the Ingress NGINX
Controller on your cluster.
</p>

<InstallIngressButtonWrapper>
Expand Down
2 changes: 1 addition & 1 deletion src/components/MAPI/apps/ClusterDetailIngress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const ClusterDetailIngress: React.FC<
<Text>
In order to expose services via Ingress, you must have{' '}
<code>external-dns</code> and an Ingress controller installed.
Giant Swarm provides the NGINX Ingress Controller as a managed
Giant Swarm provides the Ingress NGINX Controller as a managed
app.
</Text>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MAPI/apps/InstallIngressButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ const InstallIngressButton: React.FC<
<Text margin={{ left: 'small' }}>
This will install the{' '}
<StyledLink to={appDetailPath} href={appDetailPath}>
NGINX Ingress Controller app {ingressAppToInstall.spec.version}
Ingress NGINX Controller app {ingressAppToInstall.spec.version}
</StyledLink>{' '}
on cluster <ClusterIDLabel clusterID={clusterID} />
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ const GettingStartedInstallIngress: React.FC<
</Paragraph>
<Heading level={2}>Using the Giant Swarm App Platform</Heading>
<Paragraph fill={true}>
You can use our app platform to install the popular nginx ingress
controller. We provide a tuned implementation in the &quot;Giant Swarm
You can use our app platform to install the popular Ingress NGINX
Controller. We provide a tuned implementation in the &quot;Giant Swarm
Catalog&quot;, which you can browse by clicking on &quot;Apps&quot; in
the navigation above.
</Paragraph>
<Paragraph fill={true}>
For convenience however, you can click on the &apos;Install ingress
controller&apos; button below to immediately install the nginx ingress
controller on your cluster.
controller&apos; button below to immediately install the Ingress NGINX
Controller on your cluster.
</Paragraph>
{!isLoadingResources && !hasError && (
<InstallIngressButton
Expand Down
File renamed without changes
6 changes: 3 additions & 3 deletions src/model/constants/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ export const appMetas: Record<
logoUrl: '/images/app_icons/node_exporter@2x.png',
category: 'management',
},
'nginx-ingress-controller': {
name: 'nginx-ingress-controller',
logoUrl: '/images/app_icons/nginx_ingress_controller@2x.png',
'ingress-nginx': {
name: 'ingress-nginx',
logoUrl: '/images/app_icons/ingress_nginx@2x.png',
category: 'ingress',
},
kiam: {
Expand Down
8 changes: 4 additions & 4 deletions src/model/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ export const Constants = {
AZURE_SPOT_INSTANCES_MAX_PRICE_MAX: 5,
AZURE_SPOT_INSTANCES_MAX_PRICE_PRECISION: 5,

// App name of the 'nginx-ingress-controller-app'
INSTALL_INGRESS_TAB_APP_NAME: 'nginx-ingress-controller-app',
// App catalog name containing the 'nginx-ingress-controller-app'
// Name of the 'ingress-nginx' app.
INSTALL_INGRESS_TAB_APP_NAME: 'ingress-nginx',
// Name of the catalog containing the 'ingress-nginx' app.
INSTALL_INGRESS_TAB_APP_CATALOG_NAME: 'giantswarm',
// Namespace for the catalog containing the 'nginx-ingress-controller-app'
// Namespace of the catalog containing the 'ingress-nginx' app.
INSTALL_INGRESS_TAB_CATALOG_NAMESPACE: 'default',

// App catalog name containing 'cluster-PROVIDER' and 'default-apps-PROVIDER' apps
Expand Down
4 changes: 2 additions & 2 deletions src/model/stores/appcatalog/__tests__/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ describe('appcatalog::actions', () => {

describe('updateClusterApp', () => {
it('correctly composes the request payload', async () => {
const appName = 'nginx-ingress-controller-app';
const appName = 'ingress-nginx';
const clusterId = V5_CLUSTER.id;
const version = '1.9.2';
const version = '3.0.0';

const request = nock(API_ENDPOINT)
.patch(`/v5/clusters/${clusterId}/apps/${appName}/`, {
Expand Down
4 changes: 2 additions & 2 deletions test/mockHttpCalls/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ export const appResponseWithCustomConfig = {
metadata: { name: 'my app', labels: {} },
spec: {
catalog: 'giantswarm',
name: 'nginx-ingress-controller-app',
name: 'ingress-nginx',
namespace: 'giantswarm',
user_config: {
configmap: { name: 'test app', namespace: 'giantswarm' },
secret: { name: 'secret test', namespace: 'giantswarm' },
},
version: '0.0.1',
version: '3.0.0',
},
status: {
app_version: '',
Expand Down
46 changes: 23 additions & 23 deletions test/mockHttpCalls/catalogIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,35 @@ entries:
urls:
- https://giantswarm.github.io/giantswarm-catalog/cert-manager-app-1.0.1.tgz
version: 1.0.1
nginx-ingress-controller-app:
ingress-nginx:
- apiVersion: v1
appVersion: v0.26.1
created: "2020-01-04T12:51:45.418762241Z"
description: A Helm chart for the nginx ingress-controller v1.1.1
appVersion: v1.9.1
created: "2022-07-03T00:00:00.000000000Z"
description: A Helm chart for the Ingress NGINX Controller v3.1.1
digest: 017467cf56d011460877407d313330e928cb04601ae5267ab9f350afd728732c
home: https://github.com/giantswarm/nginx-ingress-controller-app
name: nginx-ingress-controller-app
home: https://github.com/giantswarm/ingress-nginx-app
name: ingress-nginx
urls:
- https://giantswarm.github.io/giantswarm-catalog/nginx-ingress-controller-app-1.1.1.tgz
version: 1.1.1
- https://giantswarm.github.io/giantswarm-catalog/ingress-nginx-3.1.1.tgz
version: 3.1.1
- apiVersion: v1
appVersion: v0.26.1
created: "2019-11-15T14:20:19.075914749Z"
description: A Helm chart for the nginx ingress-controller v1.1.0 yolo!
appVersion: v1.9.0
created: "2022-07-02T00:00:00.000000000Z"
description: A Helm chart for the Ingress NGINX Controller v3.1.0 yolo!
digest: ad899db4721159ebaf70d3126d3ba20eb808a67b332d9fee3a1ce06abb2f01c2
home: https://github.com/giantswarm/nginx-ingress-controller-app
name: nginx-ingress-controller-app
home: https://github.com/giantswarm/ingress-nginx-app
name: ingress-nginx
urls:
- https://giantswarm.github.io/giantswarm-catalog/nginx-ingress-controller-app-1.1.0.tgz
version: 1.1.0
- https://giantswarm.github.io/giantswarm-catalog/ingress-nginx-3.1.0.tgz
version: 3.1.0
- apiVersion: v1
appVersion: v0.25.1
created: "2019-10-28T11:56:20.000452981Z"
description: A Helm chart for the nginx ingress-controller v0.0.1
appVersion: v1.8.0
created: "2022-07-01T00:00:00.000000000Z"
description: A Helm chart for the Ingress NGINX Controller v3.0.0
digest: c5c11d1277934f08413f84b4da0f307684c71617b16b37f98da4ebd6afc9a9e5
home: https://github.com/giantswarm/nginx-ingress-controller-app
name: nginx-ingress-controller-app
home: https://github.com/giantswarm/ingress-nginx-app
name: ingress-nginx
urls:
- https://giantswarm.github.io/giantswarm-catalog/nginx-ingress-controller-app-0.12.0.tgz
version: 0.0.1
generated: "2020-01-04T12:51:45.418183532Z"`;
- https://giantswarm.github.io/giantswarm-catalog/ingress-nginx-3.0.0.tgz
version: 3.0.0
generated: "2022-07-07T00:00:00.000000000Z"`;
12 changes: 0 additions & 12 deletions test/mockHttpCalls/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ export const disabledRelease = {
name: 'metrics-server',
version: '0.3.1',
},
{
name: 'nginx-ingress-controller',
version: '0.25.1',
},
{
name: 'node-exporter',
version: '0.18.0',
Expand Down Expand Up @@ -189,10 +185,6 @@ export const preNodePoolRelease = {
name: 'metrics-server',
version: '0.3.1',
},
{
name: 'nginx-ingress-controller',
version: '0.25.1',
},
{
name: 'node-exporter',
version: '0.18.0',
Expand Down Expand Up @@ -313,10 +305,6 @@ export const nodePoolRelease = {
name: 'metrics-server',
version: '0.4.1',
},
{
name: 'nginx-ingress-controller',
version: '0.26.1',
},
{
name: 'node-exporter',
version: '0.18.0',
Expand Down

0 comments on commit 4c3a340

Please sign in to comment.