-
Notifications
You must be signed in to change notification settings - Fork 150
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
Kubernetes typeDefs Revision alpha1 (WIP) #1582
Conversation
services/api/src/typeDefs.js
Outdated
@@ -163,7 +166,7 @@ const typeDefs = gql` | |||
billingSoftware: String | |||
} | |||
|
|||
type Openshift { | |||
type DeploymentTarget { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
}
}
services/api/src/typeDefs.js
Outdated
@@ -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' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
services/api/src/typeDefs.js
Outdated
""" | ||
openshiftProjectPattern: String | ||
namespaceEnvironment: String |
There was a problem hiding this comment.
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
services/api/src/typeDefs.js
Outdated
""" | ||
openshiftProjectName: String | ||
targetName: String |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
services/api/src/typeDefs.js
Outdated
@@ -102,6 +100,11 @@ const typeDefs = gql` | |||
ZAR | |||
} | |||
|
|||
enum DeploymentTargets { |
There was a problem hiding this comment.
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
The thinking here is long superseded! |
Checklist
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).