Skip to content

Commit

Permalink
Yaml fixes for yaml linting
Browse files Browse the repository at this point in the history
Signed-off-by: Anish Asthana <[email protected]>
  • Loading branch information
anishasthana authored and openshift-merge-robot committed Feb 24, 2023
1 parent 41df70b commit b94ee4d
Show file tree
Hide file tree
Showing 17 changed files with 74 additions and 70 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
7 changes: 6 additions & 1 deletion .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ rules:
document-start: disable
indentation:
indent-sequences: whatever
comments:
ignore: |
config/samples/kustomization.yaml
config/crd/kustomization.yaml
config/scorecard/kustomization.yaml
config/manifests/kustomization.yaml
comments-indentation: disable
hyphens:
max-spaces-after: 4
truthy:
check-keys: false

22 changes: 11 additions & 11 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace: codeflare-operator-system
namePrefix: codeflare-operator-

# Labels to add to all resources and selectors.
#commonLabels:
# commonLabels:
# someName: someValue

bases:
Expand All @@ -18,11 +18,11 @@ bases:
- ../manager
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
#- ../webhook
# - ../webhook
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
#- ../certmanager
# - ../certmanager
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus
# - ../prometheus

patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth.
Expand All @@ -32,42 +32,42 @@ patchesStrategicMerge:

# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
#- manager_config_patch.yaml
# - manager_config_patch.yaml

# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
#- manager_webhook_patch.yaml
# - manager_webhook_patch.yaml

# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
# 'CERTMANAGER' needs to be enabled to use ca injection
#- webhookcainjection_patch.yaml
# - webhookcainjection_patch.yaml

# the following config is for teaching kustomize how to do var substitution
vars:
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
# - name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
# objref:
# kind: Certificate
# group: cert-manager.io
# version: v1
# name: serving-cert # this name should match the one in certificate.yaml
# fieldref:
# fieldpath: metadata.namespace
#- name: CERTIFICATE_NAME
# - name: CERTIFICATE_NAME
# objref:
# kind: Certificate
# group: cert-manager.io
# version: v1
# name: serving-cert # this name should match the one in certificate.yaml
#- name: SERVICE_NAMESPACE # namespace of the service
# - name: SERVICE_NAMESPACE # namespace of the service
# objref:
# kind: Service
# version: v1
# name: webhook-service
# fieldref:
# fieldpath: metadata.namespace
#- name: SERVICE_NAME
# - name: SERVICE_NAME
# objref:
# kind: Service
# version: v1
Expand Down
2 changes: 1 addition & 1 deletion config/internal/mcad/apiservice_custom-metrics.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{{ if (eq .Values.configMap.multiCluster true) }}
# {{ if (eq .Values.configMap.multiCluster true) }}
apiVersion: apiregistration.k8s.io/v1beta1
kind: APIService
metadata:
Expand Down
2 changes: 1 addition & 1 deletion config/internal/mcad/apiservice_external-metrics.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{{ if (eq .Values.configMap.multiCluster true) }}
# {{ if (eq .Values.configMap.multiCluster true) }}
apiVersion: apiregistration.k8s.io/v1beta1
kind: APIService
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ rules:
- patch
- update
- watch
#{{ if .Values.quotaManagement.rbac.apiGroup }}
#{{ if .Values.quotaManagement.rbac.resource }}
# {{ if .Values.quotaManagement.rbac.apiGroup }}
# {{ if .Values.quotaManagement.rbac.resource }}
- apiGroups:
- {{ .Values.quotaManagement.rbac.apiGroup }}
- {{.Values.quotaManagement.rbac.apiGroup}}
resources:
- {{ .Values.quotaManagement.rbac.resource }}
- {{.Values.quotaManagement.rbac.resource}}
verbs:
- get
- list
Expand All @@ -53,14 +53,14 @@ rules:
- update
- patch
- delete
#{{ end }}
#{{ end }}
#{{ if .Values.coscheduler.rbac.apiGroup }}
#{{ if .Values.coscheduler.rbac.resource }}
# {{ end }}
# {{ end }}
# {{ if .Values.coscheduler.rbac.apiGroup }}
# {{ if .Values.coscheduler.rbac.resource }}
- apiGroups:
- {{ .Values.coscheduler.rbac.apiGroup }}
- {{.Values.coscheduler.rbac.apiGroup}}
resources:
- {{ .Values.coscheduler.rbac.resource }}
- {{.Values.coscheduler.rbac.resource}}
verbs:
- get
- list
Expand All @@ -69,5 +69,5 @@ rules:
- update
- patch
- delete
#{{ end }}
#{{ end }}
# {{ end }}
# {{ end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{{ if .Values.serviceAccount }}
# {{ if .Values.serviceAccount }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -9,5 +9,5 @@ roleRef:
name: custom-metrics-resource-reader
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount }}
name: {{.Values.serviceAccount}}
namespace: kube-system
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{{ if .Values.serviceAccount }}
# {{ if .Values.serviceAccount }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -9,5 +9,5 @@ roleRef:
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount }}
name: {{.Values.serviceAccount}}
namespace: kube-system
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{{ if .Values.serviceAccount }}
# {{ if .Values.serviceAccount }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -13,5 +13,5 @@ roleRef:
name: edit
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount }}
name: {{.Values.serviceAccount}}
namespace: kube-system
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{{ if .Values.serviceAccount }}
# {{ if .Values.serviceAccount }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -13,5 +13,5 @@ roleRef:
name: system:kube-scheduler
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount }}
name: {{.Values.serviceAccount}}
namespace: kube-system
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{{ if .Values.serviceAccount }}
# {{ if .Values.serviceAccount }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -13,5 +13,5 @@ roleRef:
name: system:controller:xqueuejob-controller
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount }}
name: {{.Values.serviceAccount}}
namespace: kube-system
36 changes: 18 additions & 18 deletions config/internal/mcad/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ spec:
spec:
containers:
- name: mcad-controller
- #{{ if (eq .Values.configMap.multiCluster true) }}
args: [ "--v", "10", "--logtostderr", "--secure-port=6443" ]
#{{ end }}
#{{ if (eq .Values.configMap.multiCluster false) }}
args: [ "--v", "{{ .Values.loglevel }}", "--logtostderr" ]
#{{ end }}
- # {{ if (eq .Values.configMap.multiCluster true) }}
args: ["--v", "10", "--logtostderr", "--secure-port=6443"]
# {{ end }}
# {{ if (eq .Values.configMap.multiCluster false) }}
# args: [ "--v", "{{ .Values.loglevel }}", "--logtostderr" ]
# {{ end }}
command:
- mcad-controller
#{{ if .Values.configMap.name }}
# {{ if .Values.configMap.name }}
envFrom:
- configMapRef:
name: mcad-controller-configmap
Expand All @@ -45,43 +45,43 @@ spec:
limits:
cpu: '2'
memory: 2Gi
requests:s
requests:
cpu: '2'
memory: 2Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- name: temp-vol
mountPath: /tmp
#{{ if .Values.volumes.hostPath }}
# {{ if .Values.volumes.hostPath }}
- name: agent-config-vol
mountPath: /root/kubernetes
#{{ if .Values.configMap.quotaRestUrl }}
# {{ if .Values.configMap.quotaRestUrl }}
- name: "quota-httpserver"
image: "{{ .Values.httpServerImage.repository }}:{{ .Values.httpServerImage.tag }}"
imagePullPolicy: {{ .Values.httpServerImage.pullPolicy }}
imagePullPolicy: {{.Values.httpServerImage.pullPolicy}}
ports:
- containerPort: 80
- name: "quota-management"
image: "{{ .Values.httpImage.repository }}:{{ .Values.httpImage.tag }}"
imagePullPolicy: {{ .Values.httpImage.pullPolicy }}
imagePullPolicy: {{.Values.httpImage.pullPolicy}}
ports:
- containerPort: 8081
volumeMounts:
- mountPath: /tmp
name: temp-vol
#{{ if .Values.volumes.hostPath }}
# {{ if .Values.volumes.hostPath }}
- name: agent-config-vol
mountPath: /root/kubernetes
#{{ end }}
#{{ end }}
# {{ end }}
# {{ end }}
nodeSelector:
kubernetes.io/hostname: {{ .Values.nodeSelector.hostname }}
kubernetes.io/hostname: {{.Values.nodeSelector.hostname}}
serviceAccountName: mcad-controller-{{.Name}}
volumes:
- name: temp-vol
emptyDir: {}
#{{ if .Values.volumes.hostPath }}
# {{ if .Values.volumes.hostPath }}
- name: agent-config-vol
hostPath:
path: {{ .Values.volumes.hostPath }}
path: {{.Values.volumes.hostPath}}
8 changes: 4 additions & 4 deletions config/internal/mcad/image_secret.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#{{ if .Values.imagePullSecret.name }}
# {{ if .Values.imagePullSecret.name }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.imagePullSecret.name }}
name: {{.Values.imagePullSecret.name}}
namespace: kube-system
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
#{{ end }}
.dockerconfigjson: {{template "imagePullSecret" .}}
# {{ end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{{ if .Values.serviceAccount }}
# {{ if .Values.serviceAccount }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand All @@ -10,5 +10,5 @@ roleRef:
name: extension-apiserver-authentication-reader
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount }}
name: {{.Values.serviceAccount}}
namespace: kube-system
4 changes: 2 additions & 2 deletions config/internal/mcad/service_nodeport.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#{{ if .Values.configMap.quotaRestUrl }}
# {{ if .Values.configMap.quotaRestUrl }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -14,4 +14,4 @@ spec:
# Optional field
# By default and for convenience, the Kubernetes control plane will allocate a port from a range (default: 30000-32767)
nodePort: 30082
#{{ end }}
# {{ end }}
10 changes: 5 additions & 5 deletions config/internal/mcad/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#{{ if .Values.serviceAccount }}
# {{ if .Values.serviceAccount }}
apiVersion: v1
#{{ if .Values.imagePullSecret.name }}
# {{ if .Values.imagePullSecret.name }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret.name }}
#{{ end }}
- name: {{.Values.imagePullSecret.name}}
# {{ end }}
kind: ServiceAccount
metadata:
labels:
wdc.ibm.com/ownership: admin
name: {{ .Values.serviceAccount }}
name: {{.Values.serviceAccount}}
namespace: kube-system
1 change: 0 additions & 1 deletion config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Prometheus Monitor Service (Metrics)
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand Down

0 comments on commit b94ee4d

Please sign in to comment.