// TODO(user): Add simple overview of use/purpose
// TODO(user): An in-depth paragraph about your project and overview of use
- go version ~v1.21.0
- Several of the operator sdk build tools have been observed not to work on higher Go versions. gvm is a potential solution for
- docker version 17.03+.
- kubectl version v1.11.3+.
- Access to a Kubernetes v1.11.3+ cluster.
Before attempting to deploy to a cluster, ensure automated tests pass.
cd gmos-k8s-operator
make test
See minikube start documentation for installation installation instructions. After installation, ensure you are running kubectl against your local cluster with:
kubectl config use-context minikube
Build and your image into the minikube docker namespace
# minikube build env doesn't appear to support docker-compose, need to run a raw docker build command
eval $(minikube docker-env)
docker build -t hub.opensciencegrid.org/mwestphall/gmos-k8s-operator .
Create an OSPool access token Secret:
For testing purposes, this may be a dummy value. If you wish for deployed EPs to connect to a real htcondor pool, you must supply a real IDToken for that pool.
kubectl create secret generic \
--dry-run=client gm-file-server-pilot-tokn \
--from-literal=ospool-ep.tkn=<some token value> -o yaml \
> kustomize/secrets/pilot-token.yaml
WARNING: this token file is .gitignored by default. If using a real token, ensure that that it is not committed.
Deploy to the local minikube cluster:
kubectl apply -k kustomize
Tail the logs of the operator pod in the operator namespace:
kubectl -n glidein-manager-operator logs -f deployment/glidein-manager-controller-manager
Inspect the resources created in the dev
namespace by the operator:
- Deployments:
kubectl -n dev get deployment | grep glideinmanagerpilotset
- Pods:
kubectl -n dev get pod | grep glideinmanagerpilotset
- ConfigMaps:
kubectl -n dev get configmap | grep glideinmanagerpilotset
- Secrets:
kubectl -n dev get secret | grep glideinmanagerpilotset
Update the Custom Resource (CR) that drives the operator's behavior, observe the operator's response to changes:
kubectl -n dev edit glideinmanagerpilotset glideinmanagerpilotset-sample
kubectl -n glidein-manager-operator logs -f deployment/glidein-manager-controller-manager
Update the URL that points to the git repo that drives the operator's behavior, observe the operator's response to changes:
# Find the field with name: REPO_URL under env:, edit the value
kubectl -n dev edit deployment gm-file-server
Delete the instances (CRs) from the cluster:
./delete_resources.sh
// TODO(user): Add detailed information on how you would like others to contribute to this project
NOTE: Run make help
for more information on all potential make
targets
More information can be found via the Kubebuilder Documentation
Copyright 2024.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.