Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"codertemplates",
"coderworkspace",
"coderworkspaces",
"coderworkspaceproxy",
"coderworkspaceproxies",
"coderprovisioner",
"coderprovisioners",
"controllerapp",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
`coder-k8s` is a Go-based Kubernetes control-plane project with two app modes:

- A `controller-runtime` operator for managing `CoderControlPlane` and
`WorkspaceProxy` resources (`coder.com/v1alpha1`).
`CoderWorkspaceProxy` resources (`coder.com/v1alpha1`).
- An aggregated API server for `CoderWorkspace` and `CoderTemplate` resources
(`aggregation.coder.com/v1alpha1`).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ type WorkspaceProxyStatus struct {

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Namespaced
// +kubebuilder:resource:path=coderworkspaceproxies,scope=Namespaced
// +kubebuilder:subresource:status

// WorkspaceProxy is the schema for Coder workspace proxy resources.
type WorkspaceProxy struct {
// CoderWorkspaceProxy is the schema for Coder workspace proxy resources.
type CoderWorkspaceProxy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Expand All @@ -86,13 +86,13 @@ type WorkspaceProxy struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

// WorkspaceProxyList contains a list of WorkspaceProxy objects.
type WorkspaceProxyList struct {
// CoderWorkspaceProxyList contains a list of CoderWorkspaceProxy objects.
type CoderWorkspaceProxyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []WorkspaceProxy `json:"items"`
Items []CoderWorkspaceProxy `json:"items"`
}

func init() {
SchemeBuilder.Register(&WorkspaceProxy{}, &WorkspaceProxyList{})
SchemeBuilder.Register(&CoderWorkspaceProxy{}, &CoderWorkspaceProxyList{})
}
118 changes: 59 additions & 59 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.20.0
name: workspaceproxies.coder.com
name: coderworkspaceproxies.coder.com
spec:
group: coder.com
names:
kind: WorkspaceProxy
listKind: WorkspaceProxyList
plural: workspaceproxies
singular: workspaceproxy
kind: CoderWorkspaceProxy
listKind: CoderWorkspaceProxyList
plural: coderworkspaceproxies
singular: coderworkspaceproxy
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: WorkspaceProxy is the schema for Coder workspace proxy resources.
description: CoderWorkspaceProxy is the schema for Coder workspace proxy resources.
properties:
apiVersion:
description: |-
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ rules:
resources:
- codercontrolplanes
- coderprovisioners
- workspaceproxies
- coderworkspaceproxies
verbs:
- create
- delete
Expand All @@ -85,15 +85,15 @@ rules:
resources:
- codercontrolplanes/finalizers
- coderprovisioners/finalizers
- workspaceproxies/finalizers
- coderworkspaceproxies/finalizers
verbs:
- update
- apiGroups:
- coder.com
resources:
- codercontrolplanes/status
- coderprovisioners/status
- workspaceproxies/status
- coderworkspaceproxies/status
verbs:
- get
- patch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: coder.com/v1alpha1
kind: WorkspaceProxy
kind: CoderWorkspaceProxy
metadata:
name: workspaceproxy-sample
name: coderworkspaceproxy-sample
namespace: default
spec:
image: "ghcr.io/coder/coder:latest"
primaryAccessURL: "https://coder.example.com"
proxySessionTokenSecretRef:
name: workspaceproxy-token
name: coderworkspaceproxy-token
key: token
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- Code generated by hack/update-reference-docs.sh using github.com/elastic/crd-ref-docs. DO NOT EDIT. -->

# `WorkspaceProxy`
# `CoderWorkspaceProxy`

## API identity

- Group/version: `coder.com/v1alpha1`
- Kind: `WorkspaceProxy`
- Resource: `workspaceproxies`
- Kind: `CoderWorkspaceProxy`
- Resource: `coderworkspaceproxies`
- Scope: namespaced

## Spec
Expand Down Expand Up @@ -53,5 +53,5 @@

## Source

- Go type: `api/v1alpha1/workspaceproxy_types.go`
- Generated CRD: `config/crd/bases/coder.com_workspaceproxies.yaml`
- Go type: `api/v1alpha1/coderworkspaceproxy_types.go`
- Generated CRD: `config/crd/bases/coder.com_coderworkspaceproxies.yaml`
6 changes: 3 additions & 3 deletions internal/app/controllerapp/controllerapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ func SetupControllers(mgr manager.Manager) error {
return fmt.Errorf("unable to create controller: %w", err)
}

workspaceProxyReconciler := &controller.WorkspaceProxyReconciler{
coderWorkspaceProxyReconciler := &controller.CoderWorkspaceProxyReconciler{
Client: client,
Scheme: managerScheme,
BootstrapClient: coderbootstrap.NewSDKClient(),
}
if err := workspaceProxyReconciler.SetupWithManager(mgr); err != nil {
return fmt.Errorf("unable to create workspace proxy controller: %w", err)
if err := coderWorkspaceProxyReconciler.SetupWithManager(mgr); err != nil {
return fmt.Errorf("unable to create coder workspace proxy controller: %w", err)
}

provisionerReconciler := &controller.CoderProvisionerReconciler{
Expand Down
Loading
Loading