-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaning up new installation process (#97)
removing exec mod from scripts removing unused files adding issuer and certificate objects for cert-manager setup changing hooks' weights removing unused script
- Loading branch information
Showing
10 changed files
with
147 additions
and
35 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
deployments/node/templates/fluidos-configure-liqo-cm-authz.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
annotations: | ||
kubernetes.io/enforce-mountable-secrets: "true" | ||
name: configure-liqo-cm-sa | ||
namespace: {{ .Release.Namespace }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: manage-liqo-cm-clusterrole | ||
rules: | ||
- apiGroups: ["apps"] | ||
resources: ["deployments"] | ||
verbs: ["get", "patch"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: list-nodes | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["list"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: manage-liqo-cm-clusterrolebinding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: configure-liqo-cm-sa | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: manage-liqo-cm-clusterrole | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: list-nodes-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: list-nodes | ||
subjects: | ||
- kind: ServiceAccount | ||
name: configure-liqo-cm-sa | ||
namespace: {{ .Release.Namespace }} |
9 changes: 0 additions & 9 deletions
9
deployments/node/templates/fluidos-liqo-controller-manager-role.yaml
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
deployments/node/templates/fluidos-lqo-controller-manager-rolebinding.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
deployments/node/templates/fluidos-pre-install-issuer-and-cert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{- $resManagerConfig := (merge (dict "name" "local-resource-manager" "module" "local-resource-manager") .) -}} | ||
|
||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
annotations: | ||
"helm.sh/hook": pre-install | ||
"helm.sh/hook-weight": "-1" | ||
labels: | ||
{{- include "fluidos.labels" $resManagerConfig | nindent 4 }} | ||
name: fluidos-self-signed | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
selfSigned: {} | ||
--- | ||
{{- $rearManagerConfig := (merge (dict "name" "rear-manager" "module" "rear-manager") .) -}} | ||
|
||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
annotations: | ||
"helm.sh/hook": pre-install | ||
"helm.sh/hook-weight": "-1" | ||
name: {{ include "fluidos.prefixedName" $rearManagerConfig }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
dnsNames: | ||
- {{ include "fluidos.prefixedName" $rearManagerConfig }}.{{ .Release.Namespace }}.svc | ||
- {{ include "fluidos.prefixedName" $rearManagerConfig }}.{{ .Release.Namespace }}.svc.cluster.local | ||
issuerRef: | ||
kind: Issuer | ||
name: fluidos-self-signed | ||
secretName: {{ include "fluidos.prefixedName" $rearManagerConfig }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
|
||
# Function to check if liqoctl is installed | ||
check_and_install_liqoctl() { | ||
if ! command -v liqoctl &> /dev/null; then | ||
echo "liqoctl not found. Installing liqoctl..." | ||
# Example installation command for liqoctl, you may need to update this based on the official installation instructions | ||
curl -sL https://get.liqo.io | bash || { echo "Failed to install liqoctl"; exit 1; } | ||
echo "liqoctl installed successfully." | ||
else | ||
echo "liqoctl is already installed." | ||
fi | ||
} | ||
|
||
# Check if provider parameter is provided | ||
if [ -z "$1" ]; then | ||
echo "No provider specified. Please provide a cloud provider (aws, azure, gcp, etc.)." | ||
exit 1 | ||
fi | ||
|
||
check_and_install_liqoctl | ||
|
||
# Get the provider parameter | ||
PROVIDER=$1 | ||
|
||
control_plane_node=$(kubectl get nodes -l node-role.kubernetes.io/control-plane -o jsonpath='{.items[0].metadata.name}') | ||
cluster_name=${control_plane_node%-control-plane} | ||
|
||
|
||
# Install Liqo based on the provider | ||
liqoctl install "$PROVIDER" --cluster-name "$cluster_name" || { echo "Failed to install Liqo for provider: $PROVIDER"; exit 1; } | ||
# liqoctl install "$PROVIDER" || { echo "Failed to install Liqo for provider: $PROVIDER"; exit 1; } | ||
|
||
echo "Liqo installation for provider $PROVIDER completed successfully." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters