Skip to content

Commit

Permalink
Merge branch 'main' of github.com:webmeshproj/webmesh-vdi into rework-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyzimmer committed Oct 20, 2023
2 parents 3d724f2 + 52a1673 commit 345bb0e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions apis/app/v1/vdicluster_app_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ import (

// GetAppName returns the name of the kVDI app deployment for this VDICluster.
func (c *VDICluster) GetAppName() string {
if c.Spec.App != nil && c.Spec.App.ServiceName != "" {
return c.Spec.App.ServiceName
}
return fmt.Sprintf("%s-app", c.GetName())
}

Expand Down
3 changes: 3 additions & 0 deletions apis/app/v1/vdicluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ type AppConfig struct {
AuditLog bool `json:"auditLog,omitempty"`
// The number of app replicas to run
Replicas int32 `json:"replicas,omitempty"`
// ServiceName is the name of the service to create for the app instance.
// Defaults to `{vdi-name}-app`.
ServiceName string `json:"serviceName,omitempty"`
// The type of service to create in front of the app instance.
// Defaults to `LoadBalancer`.
ServiceType corev1.ServiceType `json:"serviceType,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/app.kvdi.io_vdiclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ spec:
type: string
description: Extra annotations to apply to the app service.
type: object
serviceName:
description: ServiceName is the name of the service to create
for the app instance. Defaults to `{vdi-name}-app`.
type: string
serviceType:
description: The type of service to create in front of the app
instance. Defaults to `LoadBalancer`.
Expand Down
3 changes: 3 additions & 0 deletions deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,9 @@ spec:
type: string
description: Extra annotations to apply to the app service.
type: object
serviceName:
description: ServiceName is the name of the service to create for the app instance. Defaults to `{vdi-name}-app`.
type: string
serviceType:
description: The type of service to create in front of the app instance. Defaults to `LoadBalancer`.
type: string
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/app/app_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func newAppContainerForCR(instance *appv1.VDICluster) corev1.Container {
if instance.EnableCORS() {
args = append(args, "--enable-cors")
}
if instance.Spec.App.TLS != nil && instance.Spec.App.TLS.Disable {
if instance.Spec.App != nil && instance.Spec.App.TLS != nil && instance.Spec.App.TLS.Disable {
args = append(args, "--disable-tls")
}
return corev1.Container{
Expand Down

0 comments on commit 345bb0e

Please sign in to comment.