diff --git a/.github/workflows/go-postsubmit.yml b/.github/workflows/go-postsubmit.yml index 7584bed4d..31b5b081a 100644 --- a/.github/workflows/go-postsubmit.yml +++ b/.github/workflows/go-postsubmit.yml @@ -70,4 +70,4 @@ jobs: quay.io/open-cluster-management/cluster-proxy:latest-arm64 --arch arm64 - name: push run: | - docker manifest push quay.io/open-cluster-management/cluster-proxy:latest \ No newline at end of file + docker manifest push quay.io/open-cluster-management/cluster-proxy:latest diff --git a/.github/workflows/go-presubmit.yml b/.github/workflows/go-presubmit.yml index 644c724b9..3edc1cb6f 100644 --- a/.github/workflows/go-presubmit.yml +++ b/.github/workflows/go-presubmit.yml @@ -36,7 +36,14 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: build run: make build - + lint: + name: lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Linelint + uses: fernandrone/linelint@0.0.4 unit: name: unit runs-on: ubuntu-latest @@ -68,7 +75,7 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: integration run: make test-integration - + e2e: name: e2e runs-on: ubuntu-latest diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index dae8cef65..213f8918f 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -138,4 +138,4 @@ jobs: } catch(error) { console.error(error); core.setFailed(error); - } \ No newline at end of file + } diff --git a/.linelint.yml b/.linelint.yml new file mode 100644 index 000000000..ba106c79b --- /dev/null +++ b/.linelint.yml @@ -0,0 +1,6 @@ +rules: + end-of-file: + enable: true + ignore: + - FQA.md + - hack/boilerplate.go.txt diff --git a/charts/cluster-proxy/templates/clusterrole.yaml b/charts/cluster-proxy/templates/clusterrole.yaml index 65131dade..328eeae31 100644 --- a/charts/cluster-proxy/templates/clusterrole.yaml +++ b/charts/cluster-proxy/templates/clusterrole.yaml @@ -104,4 +104,4 @@ rules: resources: - leases verbs: - - "*" \ No newline at end of file + - "*" diff --git a/charts/cluster-proxy/templates/manager-deployment.yaml b/charts/cluster-proxy/templates/manager-deployment.yaml index becc5cc57..98df1ebb7 100644 --- a/charts/cluster-proxy/templates/manager-deployment.yaml +++ b/charts/cluster-proxy/templates/manager-deployment.yaml @@ -22,4 +22,4 @@ spec: - /manager args: - --leader-elect=true - - --signer-secret-namespace={{ .Release.Namespace }} \ No newline at end of file + - --signer-secret-namespace={{ .Release.Namespace }} diff --git a/charts/cluster-proxy/templates/role.yaml b/charts/cluster-proxy/templates/role.yaml index 3a0e0c27a..bd34a0f1e 100644 --- a/charts/cluster-proxy/templates/role.yaml +++ b/charts/cluster-proxy/templates/role.yaml @@ -36,4 +36,4 @@ rules: - get - create - update - - patch \ No newline at end of file + - patch diff --git a/charts/cluster-proxy/values.yaml b/charts/cluster-proxy/values.yaml index 7f22c38ca..f8d892858 100644 --- a/charts/cluster-proxy/values.yaml +++ b/charts/cluster-proxy/values.yaml @@ -18,4 +18,4 @@ proxyAgentImage: quay.io/open-cluster-management/cluster-proxy:v0.2.0 proxyServer: entrypointLoadBalancer: false entrypointAddress: "" - port: 8091 \ No newline at end of file + port: 8091 diff --git a/hack/crd/addon/clustermanagementaddon.yaml b/hack/crd/addon/clustermanagementaddon.yaml index a9a23019e..af1ca4f20 100644 --- a/hack/crd/addon/clustermanagementaddon.yaml +++ b/hack/crd/addon/clustermanagementaddon.yaml @@ -93,4 +93,4 @@ status: kind: "" plural: "" conditions: [] - storedVersions: [] \ No newline at end of file + storedVersions: [] diff --git a/hack/crd/addon/managedclusteraddon.yaml b/hack/crd/addon/managedclusteraddon.yaml index 89bc4a27c..6b373c4dc 100644 --- a/hack/crd/addon/managedclusteraddon.yaml +++ b/hack/crd/addon/managedclusteraddon.yaml @@ -251,4 +251,4 @@ status: kind: "" plural: "" conditions: [] - storedVersions: [] \ No newline at end of file + storedVersions: [] diff --git a/hack/samples/managedcluster.yaml b/hack/samples/managedcluster.yaml index d6da31ea3..7c8f1cdd6 100644 --- a/hack/samples/managedcluster.yaml +++ b/hack/samples/managedcluster.yaml @@ -3,4 +3,4 @@ kind: ManagedCluster metadata: name: local spec: - hubAcceptsClient: false \ No newline at end of file + hubAcceptsClient: false diff --git a/hack/samples/managedproxyconfiguration.yaml b/hack/samples/managedproxyconfiguration.yaml index 3fbe44af9..c66b868be 100644 --- a/hack/samples/managedproxyconfiguration.yaml +++ b/hack/samples/managedproxyconfiguration.yaml @@ -15,4 +15,3 @@ spec: loadBalancerService: {} proxyAgent: image: "yue9944882/proxy-agent-amd64:v0.0.22" - proxyServerHost: \ No newline at end of file diff --git a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-deployment.yaml b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-deployment.yaml index 8cf9b6d6e..678d1f272 100644 --- a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-deployment.yaml +++ b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-deployment.yaml @@ -98,4 +98,4 @@ spec: imagePullSecrets: {{- range .Values.proxyAgentImagePullSecrets }} - name: {{ . }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-role.yaml b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-role.yaml index 45f87bcf4..a2e8bf387 100644 --- a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-role.yaml +++ b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-role.yaml @@ -9,4 +9,4 @@ rules: resources: - leases verbs: - - '*' \ No newline at end of file + - '*' diff --git a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-rolebinding.yaml b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-rolebinding.yaml index 28137f1d0..6b23e05b4 100644 --- a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-rolebinding.yaml +++ b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-rolebinding.yaml @@ -10,4 +10,4 @@ roleRef: subjects: - kind: ServiceAccount name: cluster-proxy - namespace: {{ .Release.Namespace }} \ No newline at end of file + namespace: {{ .Release.Namespace }} diff --git a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/ca-secret.yaml b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/ca-secret.yaml index fd0a61753..7b4edf1dc 100644 --- a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/ca-secret.yaml +++ b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/ca-secret.yaml @@ -4,4 +4,4 @@ metadata: namespace: {{ .Release.Namespace }} name: cluster-proxy-ca data: - "ca.crt": {{ .Values.base64EncodedCAData }} \ No newline at end of file + "ca.crt": {{ .Values.base64EncodedCAData }} diff --git a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/cluster-service.yaml b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/cluster-service.yaml index 0727e3285..ade66224f 100644 --- a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/cluster-service.yaml +++ b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/cluster-service.yaml @@ -5,4 +5,4 @@ metadata: name: {{ .Values.clusterName }} spec: type: ExternalName - externalName: kubernetes.default.{{ .Values.serviceDomain }} \ No newline at end of file + externalName: kubernetes.default.{{ .Values.serviceDomain }} diff --git a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/namespace.yaml b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/namespace.yaml index 35d079470..50c2300e8 100644 --- a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/namespace.yaml +++ b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/namespace.yaml @@ -5,4 +5,4 @@ metadata: name: {{ .Release.Namespace }} annotations: helm.sh/resource-policy: keep -{{ end }} \ No newline at end of file +{{ end }} diff --git a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/service-account.yaml b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/service-account.yaml index 8f612926d..79c21124d 100644 --- a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/service-account.yaml +++ b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/service-account.yaml @@ -2,4 +2,4 @@ apiVersion: v1 kind: ServiceAccount metadata: namespace: {{ .Release.Namespace }} - name: cluster-proxy \ No newline at end of file + name: cluster-proxy diff --git a/pkg/proxyagent/agent/manifests/charts/addon-agent/values.yaml b/pkg/proxyagent/agent/manifests/charts/addon-agent/values.yaml index 0306661e9..d1410008a 100644 --- a/pkg/proxyagent/agent/manifests/charts/addon-agent/values.yaml +++ b/pkg/proxyagent/agent/manifests/charts/addon-agent/values.yaml @@ -31,4 +31,4 @@ serviceEntryPointPort: 8091 base64EncodedCAData: Zm9vCg== -serviceDomain: "" \ No newline at end of file +serviceDomain: ""