Skip to content

Commit

Permalink
rename CRD to Pomerium (pomerium#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
wasaga authored Jul 7, 2022
1 parent fa5a1a3 commit dd93170
Show file tree
Hide file tree
Showing 25 changed files with 303 additions and 237 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,12 @@ deployment:
dev-install:
@echo "==> $@"
@echo "deleting pods..."
@kubectl delete --force --selector app.kubernetes.io/name=pomerium pods || true
#@kubectl delete --force --selector app.kubernetes.io/name=pomerium pods || true
@kubectl delete deployment/pomerium --wait || true
@$(KUSTOMIZE) build config/dev/local | kubectl apply --filename -

.PHONY: dev-logs
dev-logs:
@stern -n pomerium --selector app.kubernetes.io/name=pomerium

.PHONY: dev-gen-secrets
Expand Down
27 changes: 14 additions & 13 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
domain: pomerium.io
layout:
- go.kubebuilder.io/v3
- go.kubebuilder.io/v3
multigroup: true
projectName: ingress-controller
repo: github.com/pomerium/ingress-controller
resources:
- controller: true
domain: networking.k8s.io
kind: Ingress
version: v1
- api:
crdVersion: v1
namespaced: true
domain: pomerium.io
group: ingress
kind: Settings
path: github.com/pomerium/ingress-controller/apis/ingress/v1
version: v1
- controller: true
domain: networking.k8s.io
kind: Ingress
version: v1
- api:
crdVersion: v1
namespaced: false
domain: pomerium.io
group: ingress
kind: Pomerium
plural: pomerium
path: github.com/pomerium/ingress-controller/apis/ingress/v1
version: v1
version: "3"
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ type Storage struct {

// Postgres specifies PostgreSQL database connection parameters
// +kubebuilder:validation:Optional
Postgres *PostgresStorage `json:"postgresql"`
Postgres *PostgresStorage `json:"postgres"`
}

// Authenticate service configuration parameters
Expand All @@ -155,8 +155,8 @@ type Authenticate struct {
CallbackPath *string `json:"callbackPath,omitempty"`
}

// SettingsSpec defines the desired state of Settings
type SettingsSpec struct {
// PomeriumSpec defines the desired state of Settings
type PomeriumSpec struct {
// Authenticate sets authenticate service parameters
// +kubebuilder:validation:Required
Authenticate Authenticate `json:"authenticate"`
Expand Down Expand Up @@ -202,33 +202,34 @@ type RouteStatus struct {
Error string `json:"error,omitempty"`
}

// SettingsStatus defines the observed state of Settings
type SettingsStatus struct {
// PomeriumStatus defines the observed state of Settings
type PomeriumStatus struct {
Routes map[string]RouteStatus `json:"ingress"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:path=pomerium

// Settings define runtime-configurable Pomerium settings
// Pomerium define runtime-configurable Pomerium settings
// that do not fall into the category of deployment parameters
type Settings struct {
type Pomerium struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec SettingsSpec `json:"spec,omitempty"`
Status SettingsStatus `json:"status,omitempty"`
Spec PomeriumSpec `json:"spec,omitempty"`
Status PomeriumStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// SettingsList contains a list of Settings
type SettingsList struct {
// PomeriumList contains a list of Settings
type PomeriumList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Settings `json:"items"`
Items []Pomerium `json:"items"`
}

func init() {
SchemeBuilder.Register(&Settings{}, &SettingsList{})
SchemeBuilder.Register(&Pomerium{}, &PomeriumList{})
}
Loading

0 comments on commit dd93170

Please sign in to comment.