Skip to content

Commit 8a09e62

Browse files
authored
Merge pull request #200 from jumpstarter-dev/update-operator
Update operator scripts for upstream repos
2 parents e19a325 + c94a966 commit 8a09e62

29 files changed

Lines changed: 323 additions & 6348 deletions

.github/workflows/controller-bundle.yaml

Lines changed: 0 additions & 94 deletions
This file was deleted.

controller/api/v1alpha1/client_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ type ClientStatus struct {
4141

4242
// Client is the Schema for the identities API
4343
type Client struct {
44+
// The Client in the Jumpstarter controller represents a user that can access the Jumpstarter Controller.
45+
// Clients can be associated to external identity OIDC providers by providing Username, i.e.
46+
// Spec.Username: "kc:user-name-in-keycloak"
4447
metav1.TypeMeta `json:",inline"`
4548
metav1.ObjectMeta `json:"metadata,omitempty"`
4649

controller/api/v1alpha1/exporter_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ const (
5252

5353
// Exporter is the Schema for the exporters API
5454
type Exporter struct {
55+
// Exporters represent the services that connect to the physical or virtual
56+
// devices. They are responsible for providing the access to the devices and
57+
// for the communication with the devices. A jumpstarter exporter service
58+
// should be run on a linux machine, or a pod, with the exporter credentials
59+
// and the right configuration for this resource to become online. For
60+
// more information see the Jumpstarter documentation:
61+
// https://jumpstarter.dev/main/introduction/exporters.html#exporters
5562
metav1.TypeMeta `json:",inline"`
5663
metav1.ObjectMeta `json:"metadata,omitempty"`
5764

controller/api/v1alpha1/exporteraccesspolicy_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ type ExporterAccessPolicyStatus struct {
5050

5151
// ExporterAccessPolicy is the Schema for the exporteraccesspolicies API.
5252
type ExporterAccessPolicy struct {
53+
// ExporterAccessPolicies are used to define the access policies for the exporters.
54+
// they help organize, prioritize and restrict access to the exporters by clients.
5355
metav1.TypeMeta `json:",inline"`
5456
metav1.ObjectMeta `json:"metadata,omitempty"`
5557

controller/api/v1alpha1/lease_types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ const (
7878

7979
// Lease is the Schema for the exporters API
8080
type Lease struct {
81+
// Lease is the schema for the Leases API. Leases represent a
82+
// request for a specific exporter by a client. The lease is
83+
// acquired by the client and the exporter is assigned to the lease.
84+
// The lease is released by the client when the client is done with
85+
// the exporter. For more information see the Jumpstarter documentation:
86+
//
87+
// https://jumpstarter.dev/main/reference/man-pages/jmp.html#jmp-create-lease
88+
// https://jumpstarter.dev/main/reference/man-pages/jmp.html#jmp-shell
8189
metav1.TypeMeta `json:",inline"`
8290
metav1.ObjectMeta `json:"metadata,omitempty"`
8391

controller/deploy/operator/Makefile

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,19 @@
33
# To re-generate a bundle for another specific version without changing the standard setup, you can:
44
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
55
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
6-
VERSION ?= 0.8.0
6+
VERSION ?= 0.8.1-rc.1
7+
8+
# REPLACES defines the previous operator version this release replaces in the OLM upgrade graph.
9+
# Used to generate the release-config.yaml for FBC auto-release.
10+
# Set to empty for the first release in a channel.
11+
# See: https://redhat-openshift-ecosystem.github.io/operator-pipelines/users/fbc_autorelease/
12+
REPLACES ?= jumpstarter-operator.v0.8.0
13+
14+
# FBC_CHANNELS defines the FBC catalog channels for this release.
15+
FBC_CHANNELS ?= alpha
16+
17+
# OPENSHIFT_VERSIONS defines the Red Hat OpenShift version range injected into bundle metadata.
18+
OPENSHIFT_VERSIONS ?= v4.18-v4.21
719

820
# CHANNELS define the bundle channels used in the bundle.
921
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
@@ -305,7 +317,27 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
305317
$(OPERATOR_SDK) generate kustomize manifests -q
306318
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
307319
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
320+
@# Inject Red Hat OpenShift version range into bundle metadata (not handled by operator-sdk)
321+
@if ! grep -q 'com.redhat.openshift.versions' bundle/metadata/annotations.yaml; then \
322+
echo ' com.redhat.openshift.versions: $(OPENSHIFT_VERSIONS)' >> bundle/metadata/annotations.yaml; \
323+
fi
308324
$(OPERATOR_SDK) bundle validate ./bundle
325+
@# Generate release-config.yaml for FBC auto-release
326+
@echo "---" > bundle/release-config.yaml
327+
@echo "catalog_templates:" >> bundle/release-config.yaml
328+
@echo " - template_name: basic.yaml" >> bundle/release-config.yaml
329+
@echo " channels: [$(FBC_CHANNELS)]" >> bundle/release-config.yaml
330+
ifneq ($(REPLACES),)
331+
@echo " replaces: $(REPLACES)" >> bundle/release-config.yaml
332+
@REPLACES_VER=$$(echo "$(REPLACES)" | sed 's/jumpstarter-operator\.v//'); \
333+
echo " skipRange: '>=$${REPLACES_VER} <$(VERSION)'" >> bundle/release-config.yaml
334+
endif
335+
@echo "Generated bundle/release-config.yaml"
336+
337+
.PHONY: contribute
338+
contribute: bundle ## Update community-operators repos with the current bundle.
339+
cd contribute && \
340+
./update-contributions.sh
309341

310342
.PHONY: bundle-build
311343
bundle-build: ## Build the bundle image.

controller/deploy/operator/bundle/manifests/jumpstarter-operator-controller-manager-metrics-service_v1_service.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

controller/deploy/operator/bundle/manifests/jumpstarter-operator-jumpstarter-admin-role_rbac.authorization.k8s.io_v1_clusterrole.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

controller/deploy/operator/bundle/manifests/jumpstarter-operator-jumpstarter-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

controller/deploy/operator/bundle/manifests/jumpstarter-operator-jumpstarter-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)