Skip to content

Commit

Permalink
Add linode provider support (#1287)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino authored Jan 5, 2024
1 parent 0f2e4a4 commit 678d140
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/core/lib/core/schema/provider_scaffold.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Core.Schema.ProviderScaffold do
defstruct [:name, :content]
@providers ~w(aws gcp azure equinix kind generic)a
@providers ~w(aws gcp azure equinix kind generic linode)a

def available(), do: @providers

Expand Down
11 changes: 10 additions & 1 deletion apps/core/lib/core/schema/recipe.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ defmodule Core.Schema.Recipe do
use Piazza.Ecto.Schema
alias Core.Schema.{Repository, RecipeSection, RecipeDependency, RecipeTest}

defenum Provider, gcp: 0, aws: 1, azure: 2, custom: 3, kubernetes: 4, equinix: 5, kind: 6, generic: 7
defenum Provider,
gcp: 0,
aws: 1,
azure: 2,
custom: 3,
kubernetes: 4,
equinix: 5,
kind: 6,
generic: 7,
linode: 8

defmodule OIDCSettings do
use Piazza.Ecto.Schema
Expand Down
1 change: 1 addition & 0 deletions schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ enum Provider {
EQUINIX
KIND
GENERIC
LINODE
}

type Publisher {
Expand Down
Binary file added www/public/linode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions www/src/components/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const DEFAULT_AZURE_ICON = '/azure.png'
export const DEFAULT_AWS_ICON = '/aws.png'
export const DEFAULT_EQUINIX_ICON = '/equinix-metal.png'
export const DEFAULT_KIND_ICON = '/kind.png'
export const DEFAULT_LINODE_ICON = '/linode.png'
export const DARK_AWS_ICON = '/aws-icon.png'

export const ProviderIcons = {
Expand All @@ -22,6 +23,7 @@ export const ProviderIcons = {
AZURE: DEFAULT_AZURE_ICON,
EQUINIX: DEFAULT_EQUINIX_ICON,
KIND: DEFAULT_KIND_ICON,
LINODE: DEFAULT_LINODE_ICON,
GENERIC: DEFAULT_CHART_ICON,
}

Expand Down
3 changes: 3 additions & 0 deletions www/src/components/utils/recipeHelpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const providerToIcon = {
GCP: '/gcp.png',
KIND: '/kind.png',
GENERIC: '/chart.png',
LINODE: '/linode.png',
}

export const providerToIconWidth = {
Expand All @@ -48,6 +49,7 @@ export const providerToLongName: Record<Provider, ReactNode> = {
CUSTOM: 'Custom',
KUBERNETES: 'Kubernetes',
GENERIC: 'Generic',
LINODE: 'Linode',
}

export const providerToShortName: Record<Provider, ReactNode> = {
Expand All @@ -59,6 +61,7 @@ export const providerToShortName: Record<Provider, ReactNode> = {
CUSTOM: 'Custom',
KUBERNETES: 'Kubernetes',
GENERIC: 'Generic',
LINODE: 'Linode',
}

export function getInstallCommand({
Expand Down
3 changes: 2 additions & 1 deletion www/src/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,8 @@ export enum Provider {
Gcp = 'GCP',
Generic = 'GENERIC',
Kind = 'KIND',
Kubernetes = 'KUBERNETES'
Kubernetes = 'KUBERNETES',
Linode = 'LINODE'
}

export type PublicKey = {
Expand Down

0 comments on commit 678d140

Please sign in to comment.