Skip to content

Commit

Permalink
add volume test back
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Oct 12, 2023
1 parent 4297e56 commit 8b2723f
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 108 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
strategy:
fail-fast: false
matrix:
test: [["hello-world", "ghcr.io/converged-computing/flux-view-rocky:tag-9", 60]]
test: [["hello-world", "ghcr.io/converged-computing/flux-view-rocky:tag-9", 60],
#["custom-config", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["minimal-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["post", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
Expand All @@ -75,7 +75,7 @@ jobs:
#["debug", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["flux-resource-list", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["existing-volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
#["volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["volumes", "ghcr.io/converged-computing/flux-view-rocky:tag-9", 60]]
#["snakemake", "ghcr.io/rse-ops/atacseq:app-latest", 60]]

steps:
Expand Down
11 changes: 1 addition & 10 deletions api/v1alpha2/minicluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import (
)

const (
entrypointSuffix = "-entrypoint"
curveVolumeSuffix = "-curve-mount"
entrypointSuffix = "-entrypoint"
)

// MiniCluster is an HPC cluster in Kubernetes you can control
Expand Down Expand Up @@ -387,11 +386,6 @@ type FluxSpec struct {
//+optional
CurveCert string `json:"curveCert"`

// Expect a secret for a curve cert here.
// This is ideal over the curveCert (as a string) above.
//+optional
CurveCertSecret string `json:"curveCertSecret"`

// Custom attributes for the fluxion scheduler
//+optional
Scheduler FluxScheduler `json:"scheduler"`
Expand Down Expand Up @@ -753,9 +747,6 @@ func uniqueExistingVolumes(containers []MiniClusterContainer) map[string]MiniClu
func (f *MiniCluster) EntrypointConfigMapName() string {
return f.Name + entrypointSuffix
}
func (f *MiniCluster) CurveConfigMapName() string {
return f.Name + curveVolumeSuffix
}

// Validate ensures we have data that is needed, and sets defaults if needed
func (f *MiniCluster) Validate() bool {
Expand Down
5 changes: 0 additions & 5 deletions api/v1alpha2/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,6 @@
"type": "string",
"default": ""
},
"curveCertSecret": {
"description": "Expect a secret for a curve cert here. This is ideal over the curveCert (as a string) above.",
"type": "string",
"default": ""
},
"logLevel": {
"description": "Log level to use for flux logging (only in non TestMode)",
"type": "integer",
Expand Down
8 changes: 0 additions & 8 deletions api/v1alpha2/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions chart/templates/minicluster-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,6 @@ spec:
This is not recommended in favor of providing the secret name
as curveCertSecret, below
type: string
curveCertSecret:
description: Expect a secret for a curve cert here. This is ideal
over the curveCert (as a string) above.
type: string
logLevel:
default: 6
description: Log level to use for flux logging (only in non TestMode)
Expand Down
4 changes: 0 additions & 4 deletions config/crd/bases/flux-framework.org_miniclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,6 @@ spec:
This is not recommended in favor of providing the secret name
as curveCertSecret, below
type: string
curveCertSecret:
description: Expect a secret for a curve cert here. This is ideal
over the curveCert (as a string) above.
type: string
logLevel:
default: 6
description: Log level to use for flux logging (only in non TestMode)
Expand Down
31 changes: 0 additions & 31 deletions controllers/flux/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,37 +115,6 @@ func getVolumes(cluster *api.MiniCluster) []corev1.Volume {
},
}

// We either generate a curve.cert config map, or get it from secret
curveVolumeName := cluster.CurveConfigMapName()
if cluster.Spec.Flux.CurveCertSecret != "" {
curveVolume := corev1.Volume{
Name: curveVolumeName,
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: cluster.Spec.Flux.CurveCertSecret,
Items: []corev1.KeyToPath{curveKey},
},
},
}

volumes = append(volumes, curveVolume)

} else {
curveVolume := corev1.Volume{
Name: curveVolumeName,
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{

// Namespace based on the cluster
LocalObjectReference: corev1.LocalObjectReference{
Name: cluster.CurveConfigMapName(),
},
},
},
}
volumes = append(volumes, curveVolume)
}

// Add volumes that already exist (not created by the Flux Operator)
// These are unique names and path/claim names across containers
// This can be a claim, secret, or config map
Expand Down
4 changes: 0 additions & 4 deletions examples/dist/flux-operator-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,6 @@ spec:
This is not recommended in favor of providing the secret name
as curveCertSecret, below
type: string
curveCertSecret:
description: Expect a secret for a curve cert here. This is ideal
over the curveCert (as a string) above.
type: string
logLevel:
default: 6
description: Log level to use for flux logging (only in non TestMode)
Expand Down
4 changes: 0 additions & 4 deletions examples/dist/flux-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,6 @@ spec:
This is not recommended in favor of providing the secret name
as curveCertSecret, below
type: string
curveCertSecret:
description: Expect a secret for a curve cert here. This is ideal
over the curveCert (as a string) above.
type: string
logLevel:
default: 6
description: Log level to use for flux logging (only in non TestMode)
Expand Down
1 change: 0 additions & 1 deletion examples/tests/hello-world/test.out.correct
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Defaulted container "flux-sample" out of: flux-sample, flux-view
hello world
7 changes: 3 additions & 4 deletions examples/tests/volumes/minicluster.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apiVersion: flux-framework.org/v1alpha1
apiVersion: flux-framework.org/v1alpha2
kind: MiniCluster
metadata:
name: flux-sample
namespace: flux-operator
spec:
# suppress all output except for test run
logging:
Expand All @@ -22,8 +21,8 @@ spec:

# This is a list because a pod can support multiple containers
containers:
- image: ghcr.io/flux-framework/flux-restful-api:latest
command: ls /data
- image: rockylinux:9
command: sleep
volumes:
data:
path: /data
Expand Down
2 changes: 1 addition & 1 deletion script/check-output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ expected=${TEST_DIR}/test.out.correct
actual=${TEST_DIR}/test.out

# Fallback to assuming more than one container (and wanting to see flux)
kubectl logs -n ${NAMESPACE} ${pod} -f > ${actual} 2>&1 || kubectl logs -n ${NAMESPACE} ${pod} flux-sample-1 -f > ${actual} 2>&1
kubectl logs -n ${NAMESPACE} ${pod} -c flux-sample -f > ${actual} 2>&1 || kubectl logs -n ${NAMESPACE} ${pod} flux-sample-1 -f > ${actual} 2>&1

echo "Actual:"
cat ${actual}
Expand Down
1 change: 0 additions & 1 deletion sdk/python/v1alpha2/docs/FluxSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Name | Type | Description | Notes
**connect_timeout** | **str** | Single user executable to provide to flux start | [optional] [default to '5s']
**container** | [**FluxContainer**](FluxContainer.md) | | [optional]
**curve_cert** | **str** | Optionally provide an already existing curve certificate This is not recommended in favor of providing the secret name as curveCertSecret, below | [optional] [default to '']
**curve_cert_secret** | **str** | Expect a secret for a curve cert here. This is ideal over the curveCert (as a string) above. | [optional] [default to '']
**log_level** | **int** | Log level to use for flux logging (only in non TestMode) | [optional] [default to 6]
**minimal_service** | **bool** | Only expose the broker service (to reduce load on DNS) | [optional] [default to False]
**munge_secret** | **str** | Expect a secret (named according to this string) for a munge key. This is intended for bursting. Assumed to be at /etc/munge/munge.key This is binary data. | [optional] [default to '']
Expand Down
30 changes: 1 addition & 29 deletions sdk/python/v1alpha2/fluxoperator/models/flux_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class FluxSpec(object):
'connect_timeout': 'str',
'container': 'FluxContainer',
'curve_cert': 'str',
'curve_cert_secret': 'str',
'log_level': 'int',
'minimal_service': 'bool',
'munge_secret': 'str',
Expand All @@ -57,7 +56,6 @@ class FluxSpec(object):
'connect_timeout': 'connectTimeout',
'container': 'container',
'curve_cert': 'curveCert',
'curve_cert_secret': 'curveCertSecret',
'log_level': 'logLevel',
'minimal_service': 'minimalService',
'munge_secret': 'mungeSecret',
Expand All @@ -67,7 +65,7 @@ class FluxSpec(object):
'wrap': 'wrap'
}

def __init__(self, broker_config='', bursting=None, connect_timeout='5s', container=None, curve_cert='', curve_cert_secret='', log_level=6, minimal_service=False, munge_secret='', option_flags='', scheduler=None, submit_command=None, wrap=None, local_vars_configuration=None): # noqa: E501
def __init__(self, broker_config='', bursting=None, connect_timeout='5s', container=None, curve_cert='', log_level=6, minimal_service=False, munge_secret='', option_flags='', scheduler=None, submit_command=None, wrap=None, local_vars_configuration=None): # noqa: E501
"""FluxSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration.get_default_copy()
Expand All @@ -78,7 +76,6 @@ def __init__(self, broker_config='', bursting=None, connect_timeout='5s', contai
self._connect_timeout = None
self._container = None
self._curve_cert = None
self._curve_cert_secret = None
self._log_level = None
self._minimal_service = None
self._munge_secret = None
Expand All @@ -98,8 +95,6 @@ def __init__(self, broker_config='', bursting=None, connect_timeout='5s', contai
self.container = container
if curve_cert is not None:
self.curve_cert = curve_cert
if curve_cert_secret is not None:
self.curve_cert_secret = curve_cert_secret
if log_level is not None:
self.log_level = log_level
if minimal_service is not None:
Expand Down Expand Up @@ -226,29 +221,6 @@ def curve_cert(self, curve_cert):

self._curve_cert = curve_cert

@property
def curve_cert_secret(self):
"""Gets the curve_cert_secret of this FluxSpec. # noqa: E501
Expect a secret for a curve cert here. This is ideal over the curveCert (as a string) above. # noqa: E501
:return: The curve_cert_secret of this FluxSpec. # noqa: E501
:rtype: str
"""
return self._curve_cert_secret

@curve_cert_secret.setter
def curve_cert_secret(self, curve_cert_secret):
"""Sets the curve_cert_secret of this FluxSpec.
Expect a secret for a curve cert here. This is ideal over the curveCert (as a string) above. # noqa: E501
:param curve_cert_secret: The curve_cert_secret of this FluxSpec. # noqa: E501
:type curve_cert_secret: str
"""

self._curve_cert_secret = curve_cert_secret

@property
def log_level(self):
"""Gets the log_level of this FluxSpec. # noqa: E501
Expand Down

0 comments on commit 8b2723f

Please sign in to comment.