Skip to content

Commit

Permalink
[374] Add controller installation
Browse files Browse the repository at this point in the history
  • Loading branch information
zipofar committed Nov 28, 2023
1 parent bd80420 commit 8583a31
Show file tree
Hide file tree
Showing 19 changed files with 206 additions and 151 deletions.
2 changes: 1 addition & 1 deletion lib/uffizzi/services/install_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def get_certificate_request(namespace, uri)
res = execute_command(cmd, say: false)
certificate_request = JSON.parse(res)['items'].detect { |i| i['metadata']['name'].include?(uri.host) }

return if certificate_request.nil?
return [] if certificate_request.nil?

conditions = certificate_request.dig('status', 'conditions') || []
conditions.map { |c| c.slice('type', 'status') }
Expand Down
2 changes: 1 addition & 1 deletion man/uffizzi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI" "" "October 2023" ""
.TH "UFFIZZI" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\fR \- manage Uffizzi resources
.SH "SYNOPSIS"
Expand Down
8 changes: 7 additions & 1 deletion man/uffizzi-cluster
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-CLUSTER" "" "August 2023" ""
.TH "UFFIZZI\-CLUSTER" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-cluster\fR \- manage clusters
.SH "SYNOPSIS"
Expand Down Expand Up @@ -30,6 +30,12 @@ COMMAND is one of the following:
list
List all clusters

sleep
Put a cluster to sleep (non\-destructive)

wake
Wake a cluster that is sleeping

update\-kubeconfig
Update kubeconfig file
.fi
Expand Down
2 changes: 1 addition & 1 deletion man/uffizzi-cluster-create
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-CLUSTER\-CREATE" "" "October 2023" ""
.TH "UFFIZZI\-CLUSTER\-CREATE" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-cluster\-create\fR
.P
Expand Down
2 changes: 1 addition & 1 deletion man/uffizzi-cluster-delete
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-CLUSTER\-DELETE" "" "September 2023" ""
.TH "UFFIZZI\-CLUSTER\-DELETE" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-cluster\-delete\fR \- delete a cluster
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion man/uffizzi-cluster-disconnect
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-CLUSTER\-DISCONNECT" "" "September 2023" ""
.TH "UFFIZZI\-CLUSTER\-DISCONNECT" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-cluster\-disconnect\fR \- disconnect from current cluster context
.SH "SYNOPSIS"
Expand Down
39 changes: 39 additions & 0 deletions man/uffizzi-cluster-sleep
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-CLUSTER\-SLEEP" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-cluster\-sleep\fR
.P
$ uffizzi cluster sleep \-h uffizzi\-cluster\-sleep \- put a cluster to sleep (non\-destructive) ================================================================
.SH "SYNOPSIS"
.nf
uffizzi cluster sleep [CLUSTER_NAME]
.fi
.SH "DESCRIPTION"
.nf
Scales a Uffizzi cluster down to zero resource utilization
while keeping the namespace and any stateful resources,
like persistent volume claims\. If no CLUSTER_NAME is
specified, the kubeconfig current context is used\.

For more information on Uffizzi clusters, see:
https://docs\.uffizzi\.com/references/cli/
.fi
.SH "OPTIONS"
.nf
CLUSTER_NAME
The name of the target Uffizzi cluster
.fi
.SH "EXAMPLES"
.nf
To put the Uffizzi cluster in the current context to
sleep, run:

$ uffizzi cluster sleep

To put a Uffizzi cluster outside the current context to
sleep, run:

$ uffizzi cluster sleep my\-cluster
.fi

37 changes: 37 additions & 0 deletions man/uffizzi-cluster-wake
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-CLUSTER\-WAKE" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-cluster\-wake\fR
.P
$ uffizzi cluster wake \-h uffizzi\-cluster\-wake \- wake a cluster that is sleeping ================================================================
.SH "SYNOPSIS"
.nf
uffizzi cluster wake [CLUSTER_NAME]
.fi
.SH "DESCRIPTION"
.nf
Scales up a Uffizzi cluster to its original resource
utilization from zero (see \'uffizzi cluster sleep \-h\')\.
If no CLUSTER_NAME is specified, the kubeconfig current
context is used\.

For more information on Uffizzi clusters, see:
https://docs\.uffizzi\.com/references/cli/
.fi
.SH "OPTIONS"
.nf
CLUSTER_NAME
The name of the target Uffizzi cluster
.fi
.SH "EXAMPLES"
.nf
To wake the Uffizzi cluster in the current context, run:

$ uffizzi cluster wake

To wake a Uffizzi cluster outside the current context, run:

$ uffizzi cluster wake my\-cluster
.fi

2 changes: 1 addition & 1 deletion man/uffizzi-dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-DEV" "" "October 2023" ""
.TH "UFFIZZI\-DEV" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-dev\fR \- manage dev environments
.SH "SYNOPSIS"
Expand Down
33 changes: 33 additions & 0 deletions man/uffizzi-dev-delete
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-DEV\-DELETE" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-dev\-delete\fR
.P
uffizzi dev delete \-h uffizzi\-dev\-delete \- delete a development environment ================================================================
.SH "SYNOPSIS"
.nf
uffizzi dev delete
.fi
.SH "DESCRIPTION"
.nf
Deletes a dev environment and associated Uffizzi
cluster resources, including any persistent
volumes, and the namespace itself\. The Uffizzi
cluster config is deleted from the kubeconfig file\.

For more information on Uffizzi clusters, see:
https://docs\.uffizzi\.com/references/cli/
.fi
.SH "FLAGS"
.nf
\-\-help, \-h
Show this message and exit\.
.fi
.SH "EXAMPLES"
.nf
To delete a dev environment, run:

$ uffizzi dev delete
.fi

10 changes: 2 additions & 8 deletions man/uffizzi-dev-describe
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-DEV\-DESCRIBE" "" "October 2023" ""
.TH "UFFIZZI\-DEV\-DESCRIBE" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-dev\-describe\fR
.P
$ uffizzi dev describe \-h uffizzi\-dev\-describe \- show metadata for a dev environment ================================================================
.SH "SYNOPSIS"
.nf
uffizzi dev describe <NAME>
uffizzi dev describe
.fi
.SH "DESCRIPTION"
.nf
Expand All @@ -20,12 +20,6 @@ This command can fail for the following reasons:
For more information on Uffizzi clusters, see:
https://docs\.uffizzi\.com/references/cli/
.fi
.SH "POSITIONAL ARGUMENTS"
.nf
[NAME]
NAME for the dev environment you want to describe\.
This is an optional argument\.
.fi
.SH "EXAMPLES"
.nf
The following command prints metadata for the dev
Expand Down
2 changes: 1 addition & 1 deletion man/uffizzi-dev-ingress
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-DEV\-INGRESS" "" "October 2023" ""
.TH "UFFIZZI\-DEV\-INGRESS" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-dev\-ingress\fR
.P
Expand Down
2 changes: 1 addition & 1 deletion man/uffizzi-dev-ingress-open
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-DEV\-INGRESS\-OPEN" "" "October 2023" ""
.TH "UFFIZZI\-DEV\-INGRESS\-OPEN" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-dev\-ingress\-open\fR
.P
Expand Down
15 changes: 1 addition & 14 deletions man/uffizzi-dev-start
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-DEV\-START" "" "October 2023" ""
.TH "UFFIZZI\-DEV\-START" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-dev\-start\fR \- start a development environment
.SH "SYNOPSIS"
Expand All @@ -24,8 +24,6 @@ path CONFIG_FILE\. Skaffold configurations are currently
supported\. For help creating a skaffold\.yaml file, see:
https://skaffold\.dev/docs/init/

If a kubeconfig exists

For more information on Uffizzi clusters, see:
https://docs\.uffizzi\.com/references/cli/
.fi
Expand Down Expand Up @@ -80,17 +78,6 @@ run:

$ uffizzi dev start \-\-quiet

To push your build artifacts to a private Docker Hub repo
called \'acme/foo\', first add your Docker Hub credentials:

$ uffizzi connect docker\-hub
(See `uffizzi connect \-h` for other registry options)

\|\.\|\.\|\.then override the default repo:

$ uffizzi dev start \e
\-\-default\-repo="hub\.docker\.com/acme/foo"

To start a dev environment using an alternate kubeconfig file,
run:

Expand Down
24 changes: 6 additions & 18 deletions man/uffizzi-dev-stop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "UFFIZZI\-DEV\-STOP" "" "October 2023" ""
.TH "UFFIZZI\-DEV\-STOP" "" "November 2023" ""
.SH "NAME"
\fBuffizzi\-dev\-stop\fR \- stop a development environment
.SH "SYNOPSIS"
Expand All @@ -9,23 +9,11 @@ uffizzi dev stop
.fi
.SH "DESCRIPTION"
.nf
Stops a dev environment and deletes the backing
Uffizzi cluster resources, including any persistent
volumes, and the namespace itself\. The Uffizzi
cluster config is deleted from the kubeconfig file\.

This command watches for file changes in a given local
project directory, as specified in your configuration file\.
It then serializes those changes and redeploys them onto
a Uffizzi cluster\.

The command looks for a configuration at the specified
path CONFIG_FILE\. Skaffold configurations are currently
supported\. For help creating a skaffold\.yaml file, see:
https://skaffold\.dev/docs/init/

For more information on Uffizzi clusters, see:
https://docs\.uffizzi\.com/references/cli/
Stops the skaffold process for the dev environment\.
This command does not delete the dev cluster or any
associated resources\. You can restart the dev environment
with `uffizzi dev start`\. To delete the dev cluster entirely, see
`uffizzi dev delete`\.
.fi
.SH "FLAGS"
.nf
Expand Down
Loading

0 comments on commit 8583a31

Please sign in to comment.