Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes typeDefs Revision alpha1 (WIP) #1582

Closed

Conversation

justinlevi
Copy link
Contributor

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for changelog and subsystem label(s) applied

Explain the details for making this change. What existing problem does the pull request solve?

Closing issues

Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).

@@ -163,7 +166,7 @@ const typeDefs = gql`
billingSoftware: String
}

type Openshift {
type DeploymentTarget {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each deployment target probably needs it's own settings, so there should be a type for each one. Maybe DeploymentTarget is an interface the everything extends with their own custom settings

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it useful to extend this type so that is returns projects

query {
getDeployTarget {
projects {
id
name, etc
}
}

@@ -251,22 +254,22 @@ const typeDefs = gql`
notifications(type: NotificationType): [Notification]
"""
Which internal Lagoon System is responsible for deploying
Currently only 'lagoon_openshiftBuildDeploy' exists
'lagoon_kubernetesBuildDeploy' | 'lagoon_openshiftBuildDeploy'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We should use enums
  • Should active systems config be on project level still? If they "move" to deploymenttarget level, do we even need them in the api at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it still useful to have deploymentTargets separate from internal systems

"""
openshiftProjectPattern: String
namespaceEnvironment: String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this move to deployment target. If not, namespace is still too specific

"""
openshiftProjectName: String
targetName: String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove openshiftProjectName. Add displayName which is non-globally unique (the current name field). Convert name field to be globally unique (unique key).

Openshift/K8s use the name (now unique) for projects/namespaces

openshiftProjectName: String
): Environment
environmentByDeploymentTargetName(name: String!): Environment
userCanSshToEnvironment(deploymentTargetName: String): Environment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deploymentTargetName > name assuming above unique name change is applied

@@ -541,7 +540,7 @@ const typeDefs = gql`
"""
Returns all OpenShift Objects
"""
allOpenshifts: [Openshift]
allDeploymentTargets: [Openshift | Kubernetes]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

returns DeploymentTarget interface

@@ -605,8 +604,8 @@ const typeDefs = gql`
name: String!
gitUrl: String!
subfolder: String
openshift: Int!
openshiftProjectPattern: String
deploymentTarget: DeploymentTarget
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deploymentTarget is id or name

@@ -102,6 +100,11 @@ const typeDefs = gql`
ZAR
}

enum DeploymentTargets {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably don't need enums at all

@tobybellwood tobybellwood added the 0-kubernetes Vanilla kubernetes support label Jan 23, 2020
@rocketeerbkw rocketeerbkw changed the base branch from kubernetes to master April 15, 2020 08:12
@tobybellwood tobybellwood added lagoon-one and removed 0-kubernetes Vanilla kubernetes support labels May 24, 2021
@tobybellwood tobybellwood modified the milestone: v3.0.0 May 24, 2021
@tobybellwood
Copy link
Member

The thinking here is long superseded!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants