Browse Source

OSS -> CE (community edition) changes (#18517)

pull/18545/head
Semir Patel 1 year ago committed by GitHub
parent
commit
53e28a4963
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/scripts/get_runner_classes.sh
  2. 2
      .github/scripts/get_runner_classes_windows.sh
  3. 2
      .github/workflows/build-artifacts.yml
  4. 1
      .github/workflows/build.yml
  5. 7
      .github/workflows/ce-merge-trigger.yml
  6. 2
      .github/workflows/frontend.yml
  7. 8
      .github/workflows/go-tests.yml
  8. 28
      .github/workflows/nightly-test-1.13.x.yaml
  9. 28
      .github/workflows/nightly-test-1.14.x.yaml
  10. 28
      .github/workflows/nightly-test-1.15.x.yaml
  11. 28
      .github/workflows/nightly-test-1.16.x.yaml
  12. 28
      .github/workflows/nightly-test-main.yaml
  13. 6
      .golangci.yml
  14. 1
      .release/security-scan.hcl
  15. 2
      acl/acl_ce.go
  16. 0
      acl/authorizer_ce.go
  17. 0
      acl/enterprisemeta_ce.go
  18. 0
      acl/errors_ce.go
  19. 0
      acl/policy_authorizer_ce.go
  20. 0
      acl/policy_ce.go
  21. 0
      acl/policy_merger_ce.go
  22. 0
      agent/acl_ce.go
  23. 2
      agent/agent.go
  24. 0
      agent/agent_ce.go
  25. 0
      agent/agent_ce_test.go
  26. 0
      agent/agent_endpoint_ce.go
  27. 0
      agent/agent_endpoint_ce_test.go
  28. 2
      agent/auto-config/auto_config_ce.go
  29. 0
      agent/auto-config/auto_config_ce_test.go
  30. 2
      agent/auto-config/config_ce.go
  31. 2
      agent/auto-config/mock_ce_test.go
  32. 0
      agent/catalog_endpoint_ce.go
  33. 2
      agent/config/builder_ce.go
  34. 0
      agent/config/builder_ce_test.go
  35. 0
      agent/config/config_ce.go
  36. 0
      agent/config/default_ce.go
  37. 0
      agent/config/runtime_ce.go
  38. 4
      agent/config/runtime_ce_test.go
  39. 0
      agent/config/segment_ce.go
  40. 4
      agent/config/segment_ce_test.go
  41. 6
      agent/connect/sni.go
  42. 2
      agent/connect/uri_agent_ce.go
  43. 0
      agent/connect/uri_agent_ce_test.go
  44. 2
      agent/connect/uri_mesh_gateway_ce.go
  45. 0
      agent/connect/uri_mesh_gateway_ce_test.go
  46. 4
      agent/connect/uri_service.go
  47. 6
      agent/connect/uri_service_ce.go
  48. 0
      agent/connect/uri_service_ce_test.go
  49. 0
      agent/consul/acl_authmethod_ce.go
  50. 4
      agent/consul/acl_ce.go
  51. 0
      agent/consul/acl_ce_test.go
  52. 0
      agent/consul/acl_endpoint_ce.go
  53. 0
      agent/consul/acl_server_ce.go
  54. 0
      agent/consul/auth/binder_ce.go
  55. 0
      agent/consul/auth/token_writer_ce.go
  56. 0
      agent/consul/authmethod/authmethods_ce.go
  57. 0
      agent/consul/authmethod/kubeauth/k8s_ce.go
  58. 0
      agent/consul/authmethod/ssoauth/sso_ce.go
  59. 0
      agent/consul/authmethod/testauth/testing_ce.go
  60. 0
      agent/consul/autopilot_ce.go
  61. 2
      agent/consul/catalog_endpoint.go
  62. 0
      agent/consul/config_ce.go
  63. 0
      agent/consul/discoverychain/compile_ce.go
  64. 0
      agent/consul/enterprise_client_ce.go
  65. 0
      agent/consul/enterprise_config_ce.go
  66. 4
      agent/consul/enterprise_server_ce.go
  67. 0
      agent/consul/enterprise_server_ce_test.go
  68. 0
      agent/consul/fsm/commands_ce.go
  69. 0
      agent/consul/fsm/commands_ce_test.go
  70. 2
      agent/consul/fsm/fsm.go
  71. 4
      agent/consul/fsm/snapshot_ce.go
  72. 4
      agent/consul/fsm/snapshot_ce_test.go
  73. 4
      agent/consul/fsm/snapshot_test.go
  74. 0
      agent/consul/leader_ce_test.go
  75. 4
      agent/consul/leader_intentions_ce.go
  76. 0
      agent/consul/leader_intentions_ce_test.go
  77. 0
      agent/consul/merge_ce.go
  78. 2
      agent/consul/merge_ce_test.go
  79. 0
      agent/consul/options_ce.go
  80. 0
      agent/consul/peering_backend_ce.go
  81. 0
      agent/consul/peering_backend_ce_test.go
  82. 0
      agent/consul/prepared_query/walk_ce_test.go
  83. 0
      agent/consul/prepared_query_endpoint_ce.go
  84. 2
      agent/consul/prepared_query_endpoint_ce_test.go
  85. 0
      agent/consul/rate/handler_ce.go
  86. 0
      agent/consul/reporting/reporting_ce.go
  87. 8
      agent/consul/segment_ce.go
  88. 2
      agent/consul/server_ce.go
  89. 0
      agent/consul/server_ce_test.go
  90. 0
      agent/consul/state/acl_ce.go
  91. 0
      agent/consul/state/acl_ce_test.go
  92. 2
      agent/consul/state/catalog_ce.go
  93. 0
      agent/consul/state/catalog_ce_test.go
  94. 0
      agent/consul/state/catalog_events_ce.go
  95. 2
      agent/consul/state/catalog_events_ce_test.go
  96. 2
      agent/consul/state/config_entry_ce.go
  97. 0
      agent/consul/state/config_entry_ce_test.go
  98. 0
      agent/consul/state/config_entry_exported_services_ce.go
  99. 6
      agent/consul/state/config_entry_intention.go
  100. 0
      agent/consul/state/config_entry_intention_ce.go
  101. Some files were not shown because too many files have changed in this diff Show More

2
.github/scripts/get_runner_classes.sh

@ -13,7 +13,7 @@ case "$GITHUB_REPOSITORY" in
echo "compute-small=['self-hosted', 'linux', 'small']" >> "$GITHUB_OUTPUT"
echo "compute-medium=['self-hosted', 'linux', 'medium']" >> "$GITHUB_OUTPUT"
echo "compute-large=['self-hosted', 'linux', 'large']" >> "$GITHUB_OUTPUT"
# m5d.8xlarge is equivalent to our xl custom runner in OSS
# m5d.8xlarge is equivalent to our xl custom runner in CE
echo "compute-xl=['self-hosted', 'ondemand', 'linux', 'type=m5d.8xlarge']" >> "$GITHUB_OUTPUT"
;;
*)

2
.github/scripts/get_runner_classes_windows.sh

@ -13,7 +13,7 @@ case "$GITHUB_REPOSITORY" in
echo "compute-small=['self-hosted', 'windows', 'small']" >> "$GITHUB_OUTPUT"
echo "compute-medium=['self-hosted', 'windows', 'medium']" >> "$GITHUB_OUTPUT"
echo "compute-large=['self-hosted', 'windows', 'large']" >> "$GITHUB_OUTPUT"
# m5d.8xlarge is equivalent to our xl custom runner in OSS
# m5d.8xlarge is equivalent to our xl custom runner in CE
echo "compute-xl=['self-hosted', 'ondemand', 'windows', 'type=m5d.8xlarge']" >> "$GITHUB_OUTPUT"
;;
*)

2
.github/workflows/build-artifacts.yml

@ -80,7 +80,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365 # v2.9.0
# NOTE: conditional specific logic as we store secrets in Vault in ENT and use GHA secrets in OSS.
# NOTE: conditional specific logic as we store secrets in Vault in ENT and use GHA secrets in CE.
- name: Login to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:

1
.github/workflows/build.yml

@ -13,6 +13,7 @@ on:
env:
PKG_NAME: consul
# TODO(spatel): CE refactor
METADATA: oss
GOPRIVATE: github.com/hashicorp # Required for enterprise deps

7
.github/workflows/oss-merge-trigger.yml → .github/workflows/ce-merge-trigger.yml

@ -1,7 +1,7 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
name: Trigger OSS to Enterprise Merge
name: Trigger Community Edition to Enterprise Merge
on:
pull_request_target:
types:
@ -11,8 +11,8 @@ on:
- release/**
jobs:
trigger-oss-merge:
# run this only on merge events in OSS repo
trigger-ce-merge:
# run this only on merge events in CE repo
if: ${{ github.event.pull_request.merged && github.repository == 'hashicorp/consul' }}
runs-on: ubuntu-latest
steps:
@ -22,6 +22,7 @@ jobs:
GIT_SHA: ${{ github.sha }}
GH_PAT: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
GIT_ACTOR: ${{ github.actor }}
# TODO(spatel): CE refactor
run: |
curl -H "Authorization: token $GH_PAT" \
-H 'Accept: application/json' \

2
.github/workflows/frontend.yml

@ -79,7 +79,7 @@ jobs:
matrix:
partition: [1, 2, 3, 4]
env:
EMBER_TEST_REPORT: test-results/report-oss.xml # outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml # outputs test report for CI test summary
EMBER_TEST_PARALLEL: true # enables test parallelization with ember-exam
CONSUL_NSPACES_ENABLED: ${{ endsWith(github.repository, '-enterprise') && 1 || 0 }} # NOTE: this should be 1 in ENT.
JOBS: 2 # limit parallelism for broccoli-babel-transpiler

8
.github/workflows/go-tests.yml

@ -199,7 +199,7 @@ jobs:
# elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
# dev-build-arm64:
# # only run on enterprise because GHA does not have arm64 runners in OSS
# # only run on enterprise because GHA does not have arm64 runners in CE
# if: ${{ endsWith(github.repository, '-enterprise') }}
# needs:
# - setup
@ -213,7 +213,7 @@ jobs:
# elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
# go-test-arm64:
# # only run on enterprise because GHA does not have arm64 runners in OSS
# # only run on enterprise because GHA does not have arm64 runners in CE
# if: ${{ endsWith(github.repository, '-enterprise') }}
# needs:
# - setup
@ -231,7 +231,7 @@ jobs:
# consul-license: ${{secrets.CONSUL_LICENSE}}
# datadog-api-key: "${{ !endsWith(github.repository, '-enterprise') && secrets.DATADOG_API_KEY || '' }}"
go-test-oss:
go-test-ce:
needs:
- setup
- dev-build
@ -476,7 +476,7 @@ jobs:
- lint-32bit
# - go-test-arm64
- go-test-enterprise
- go-test-oss
- go-test-ce
- go-test-race
- go-test-envoyextensions
- go-test-troubleshoot

28
.github/workflows/nightly-test-1.13.x.yaml

@ -43,7 +43,7 @@ jobs:
working-directory: ./ui/packages/consul-ui
run: make test-node
frontend-build-oss:
frontend-build-ce:
runs-on: ubuntu-latest
env:
JOBS: 2
@ -65,27 +65,27 @@ jobs:
working-directory: ./ui
run: make deps
- name: Ember Build OSS
id: build-oss
- name: Ember Build CE
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
- name: Upload OSS Frontend
- name: Upload CE Frontend
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error
frontend-test-oss:
frontend-test-ce:
runs-on: ubuntu-latest
needs: [frontend-build-oss]
needs: [frontend-build-ce]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 0
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -104,13 +104,13 @@ jobs:
working-directory: ./ui
run: make deps
- name: Download OSS Frontend
- name: Download CE Frontend
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
- name: Ember Test OSS
- name: Ember Test CE
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
@ -138,7 +138,7 @@ jobs:
run: make deps
- name: Ember Build ENT
id: build-oss
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
@ -157,7 +157,7 @@ jobs:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 1
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -219,7 +219,7 @@ jobs:
slack-failure-notification:
runs-on: ubuntu-latest
needs: [frontend-test-oss, frontend-test-ent]
needs: [frontend-test-ce, frontend-test-ent]
if: ${{ failure() }}
steps:
- name: Slack Notification

28
.github/workflows/nightly-test-1.14.x.yaml

@ -43,7 +43,7 @@ jobs:
working-directory: ./ui/packages/consul-ui
run: make test-node
frontend-build-oss:
frontend-build-ce:
runs-on: ubuntu-latest
env:
JOBS: 2
@ -65,27 +65,27 @@ jobs:
working-directory: ./ui
run: make deps
- name: Ember Build OSS
id: build-oss
- name: Ember Build CE
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
- name: Upload OSS Frontend
- name: Upload CE Frontend
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error
frontend-test-oss:
frontend-test-ce:
runs-on: ubuntu-latest
needs: [frontend-build-oss]
needs: [frontend-build-ce]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 0
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -104,13 +104,13 @@ jobs:
working-directory: ./ui
run: make deps
- name: Download OSS Frontend
- name: Download CE Frontend
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
- name: Ember Test OSS
- name: Ember Test CE
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
@ -138,7 +138,7 @@ jobs:
run: make deps
- name: Ember Build ENT
id: build-oss
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
@ -157,7 +157,7 @@ jobs:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 1
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -219,7 +219,7 @@ jobs:
slack-failure-notification:
runs-on: ubuntu-latest
needs: [frontend-test-oss, frontend-test-ent]
needs: [frontend-test-ce, frontend-test-ent]
if: ${{ failure() }}
steps:
- name: Slack Notification

28
.github/workflows/nightly-test-1.15.x.yaml

@ -43,7 +43,7 @@ jobs:
working-directory: ./ui/packages/consul-ui
run: make test-node
frontend-build-oss:
frontend-build-ce:
runs-on: ubuntu-latest
env:
JOBS: 2
@ -65,27 +65,27 @@ jobs:
working-directory: ./ui
run: make deps
- name: Ember Build OSS
id: build-oss
- name: Ember Build CE
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
- name: Upload OSS Frontend
- name: Upload CE Frontend
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error
frontend-test-oss:
frontend-test-ce:
runs-on: ubuntu-latest
needs: [frontend-build-oss]
needs: [frontend-build-ce]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 0
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -104,13 +104,13 @@ jobs:
working-directory: ./ui
run: make deps
- name: Download OSS Frontend
- name: Download CE Frontend
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
- name: Ember Test OSS
- name: Ember Test CE
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
@ -138,7 +138,7 @@ jobs:
run: make deps
- name: Ember Build ENT
id: build-oss
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
@ -157,7 +157,7 @@ jobs:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 1
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -219,7 +219,7 @@ jobs:
slack-failure-notification:
runs-on: ubuntu-latest
needs: [frontend-test-oss, frontend-test-ent]
needs: [frontend-test-ce, frontend-test-ent]
if: ${{ failure() }}
steps:
- name: Slack Notification

28
.github/workflows/nightly-test-1.16.x.yaml

@ -43,7 +43,7 @@ jobs:
working-directory: ./ui/packages/consul-ui
run: make test-node
frontend-build-oss:
frontend-build-ce:
runs-on: ubuntu-latest
env:
JOBS: 2
@ -65,27 +65,27 @@ jobs:
working-directory: ./ui
run: make deps
- name: Ember Build OSS
id: build-oss
- name: Ember Build CE
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
- name: Upload OSS Frontend
- name: Upload CE Frontend
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error
frontend-test-oss:
frontend-test-ce:
runs-on: ubuntu-latest
needs: [frontend-build-oss]
needs: [frontend-build-ce]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 0
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -104,13 +104,13 @@ jobs:
working-directory: ./ui
run: make deps
- name: Download OSS Frontend
- name: Download CE Frontend
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
- name: Ember Test OSS
- name: Ember Test CE
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
@ -138,7 +138,7 @@ jobs:
run: make deps
- name: Ember Build ENT
id: build-oss
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
@ -157,7 +157,7 @@ jobs:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 1
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -219,7 +219,7 @@ jobs:
slack-failure-notification:
runs-on: ubuntu-latest
needs: [frontend-test-oss, frontend-test-ent]
needs: [frontend-test-ce, frontend-test-ent]
if: ${{ failure() }}
steps:
- name: Slack Notification

28
.github/workflows/nightly-test-main.yaml

@ -43,7 +43,7 @@ jobs:
working-directory: ./ui/packages/consul-ui
run: make test-node
frontend-build-oss:
frontend-build-ce:
runs-on: ubuntu-latest
env:
JOBS: 2
@ -65,27 +65,27 @@ jobs:
working-directory: ./ui
run: make deps
- name: Ember Build OSS
id: build-oss
- name: Ember Build CE
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
- name: Upload OSS Frontend
- name: Upload CE Frontend
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error
frontend-test-oss:
frontend-test-ce:
runs-on: ubuntu-latest
needs: [frontend-build-oss]
needs: [frontend-build-ce]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 0
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -104,13 +104,13 @@ jobs:
working-directory: ./ui
run: make deps
- name: Download OSS Frontend
- name: Download CE Frontend
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
- name: Ember Test OSS
- name: Ember Test CE
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
@ -138,7 +138,7 @@ jobs:
run: make deps
- name: Ember Build ENT
id: build-oss
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci
@ -157,7 +157,7 @@ jobs:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 1
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@ -219,7 +219,7 @@ jobs:
slack-failure-notification:
runs-on: ubuntu-latest
needs: [frontend-test-oss, frontend-test-ent]
needs: [frontend-test-ce, frontend-test-ent]
if: ${{ failure() }}
steps:
- name: Slack Notification

6
.golangci.yml

@ -51,11 +51,11 @@ issues:
- linters: [unparam]
text: "`(t|resp|req|entMeta)` is unused"
# Temp ignore everything in _oss(_test).go and _ent(_test).go. Many of these
# Temp ignore everything in _ce(_test).go and _ent(_test).go. Many of these
# could use underscore to ignore the unused arguments, but the "always returns"
# issue will likely remain in oss, and will need to be excluded.
# issue will likely remain in CE, and will need to be excluded.
- linters: [unparam]
path: "(_oss.go|_oss_test.go|_ent.go|_ent_test.go)"
path: "(_ce.go|_ce_test.go|_ent.go|_ent_test.go)"
linters-settings:
govet:

1
.release/security-scan.hcl

@ -11,6 +11,7 @@ binary {
secrets = false
go_modules = false
osv = true
# TODO(spatel): CE refactor
oss_index = true
nvd = true
}

2
acl/acl_oss.go → acl/acl_ce.go

@ -17,7 +17,7 @@ const (
const DefaultNamespaceName = "default"
type EnterpriseConfig struct {
// no fields in OSS
// no fields in CE
}
func (_ *EnterpriseConfig) Close() {

0
acl/authorizer_oss.go → acl/authorizer_ce.go

0
acl/enterprisemeta_oss.go → acl/enterprisemeta_ce.go

0
acl/errors_oss.go → acl/errors_ce.go

0
acl/policy_authorizer_oss.go → acl/policy_authorizer_ce.go

0
acl/policy_oss.go → acl/policy_ce.go

0
acl/policy_merger_oss.go → acl/policy_merger_ce.go

0
agent/acl_oss.go → agent/acl_ce.go

2
agent/agent.go

@ -3755,7 +3755,7 @@ func (a *Agent) loadServices(conf *config.RuntimeConfig, snap map[structs.CheckI
}
if acl.EqualPartitions("", p.Service.PartitionOrEmpty()) {
// NOTE: in case loading a service with empty partition (e.g., OSS -> ENT),
// NOTE: in case loading a service with empty partition (e.g., CE -> ENT),
// we always default the service partition to the agent's partition.
p.Service.OverridePartition(a.AgentEnterpriseMeta().PartitionOrDefault())
} else if !acl.EqualPartitions(a.AgentEnterpriseMeta().PartitionOrDefault(), p.Service.PartitionOrDefault()) {

0
agent/agent_oss.go → agent/agent_ce.go

0
agent/agent_oss_test.go → agent/agent_ce_test.go

0
agent/agent_endpoint_oss.go → agent/agent_endpoint_ce.go

0
agent/agent_endpoint_oss_test.go → agent/agent_endpoint_ce_test.go

2
agent/auto-config/auto_config_oss.go → agent/auto-config/auto_config_ce.go

@ -6,7 +6,7 @@
package autoconf
// AutoConfigEnterprise has no fields in OSS
// AutoConfigEnterprise has no fields in CE
type AutoConfigEnterprise struct{}
// newAutoConfigEnterprise initializes the enterprise AutoConfig struct

0
agent/auto-config/auto_config_oss_test.go → agent/auto-config/auto_config_ce_test.go

2
agent/auto-config/config_oss.go → agent/auto-config/config_ce.go

@ -9,7 +9,7 @@ package autoconf
// EnterpriseConfig stub - only populated in Consul Enterprise
type EnterpriseConfig struct{}
// finalize is a noop for OSS
// finalize is a noop for CE
func (_ *EnterpriseConfig) validateAndFinalize() error {
return nil
}

2
agent/auto-config/mock_oss_test.go → agent/auto-config/mock_ce_test.go

@ -10,7 +10,7 @@ import (
"testing"
)
// mockedEnterpriseConfig is pretty much just a stub in OSS
// mockedEnterpriseConfig is pretty much just a stub in CE.
// It does contain an enterprise config for compatibility
// purposes but that in and of itself is just a stub.
type mockedEnterpriseConfig struct {

0
agent/catalog_endpoint_oss.go → agent/catalog_endpoint_ce.go

2
agent/config/builder_oss.go → agent/config/builder_ce.go

@ -13,7 +13,7 @@ import (
// validateEnterpriseConfig is a function to validate the enterprise specific
// configuration items after Parsing but before merging into the overall
// configuration. The original intent is to use it to ensure that we warn
// for enterprise configurations used in OSS.
// for enterprise configurations used in CE.
func validateEnterpriseConfigKeys(config *Config) []error {
var result []error
add := func(k string) {

0
agent/config/builder_oss_test.go → agent/config/builder_ce_test.go

0
agent/config/config_oss.go → agent/config/config_ce.go

0
agent/config/default_oss.go → agent/config/default_ce.go

0
agent/config/runtime_oss.go → agent/config/runtime_ce.go

4
agent/config/runtime_oss_test.go → agent/config/runtime_ce_test.go

@ -35,9 +35,9 @@ var enterpriseConfigKeyWarnings = []string{
enterpriseConfigKeyError{key: "reporting.license.enabled"}.Error(),
}
// OSS-only equivalent of TestConfigFlagsAndEdgecases
// CE-only equivalent of TestConfigFlagsAndEdgecases
// used for flags validated in ent-only code
func TestLoad_IntegrationWithFlags_OSS(t *testing.T) {
func TestLoad_IntegrationWithFlags_CE(t *testing.T) {
dataDir := testutil.TempDir(t, "consul")
defer os.RemoveAll(dataDir)

0
agent/config/segment_oss.go → agent/config/segment_ce.go

4
agent/config/segment_oss_test.go → agent/config/segment_ce_test.go

@ -18,7 +18,7 @@ func TestSegments(t *testing.T) {
tests := []testCase{
{
desc: "segment name not in OSS",
desc: "segment name not in CE",
args: []string{
`-data-dir=` + dataDir,
},
@ -42,7 +42,7 @@ func TestSegments(t *testing.T) {
},
},
{
desc: "segments not in OSS",
desc: "segments not in CE",
args: []string{
`-data-dir=` + dataDir,
},

6
agent/connect/sni.go

@ -31,7 +31,7 @@ func UpstreamSNI(u *structs.Upstream, subset string, dc string, trustDomain stri
func GatewaySNI(dc string, partition, trustDomain string) string {
if partition == "" {
// TODO(partitions) Make default available in OSS as a constant for uses like this one
// TODO(partitions) Make default available in CE as a constant for uses like this one
partition = "default"
}
@ -48,7 +48,7 @@ func ServiceSNI(service string, subset string, namespace string, partition strin
namespace = structs.IntentionDefaultNamespace
}
if partition == "" {
// TODO(partitions) Make default available in OSS as a constant for uses like this one
// TODO(partitions) Make default available in CE as a constant for uses like this one
partition = "default"
}
@ -109,7 +109,7 @@ func PeeredServiceSNI(service, namespace, partition, peerName, trustDomain strin
namespace = structs.IntentionDefaultNamespace
}
if partition == "" {
// TODO(partitions) Make default available in OSS as a constant for uses like this one
// TODO(partitions) Make default available in CE as a constant for uses like this one
partition = "default"
}

2
agent/connect/uri_agent_oss.go → agent/connect/uri_agent_ce.go

@ -13,7 +13,7 @@ import (
)
// GetEnterpriseMeta will synthesize an EnterpriseMeta struct from the SpiffeIDAgent.
// in OSS this just returns an empty (but never nil) struct pointer
// in CE this just returns an empty (but never nil) struct pointer
func (id SpiffeIDAgent) GetEnterpriseMeta() *acl.EnterpriseMeta {
return &acl.EnterpriseMeta{}
}

0
agent/connect/uri_agent_oss_test.go → agent/connect/uri_agent_ce_test.go

2
agent/connect/uri_mesh_gateway_oss.go → agent/connect/uri_mesh_gateway_ce.go

@ -13,7 +13,7 @@ import (
)
// GetEnterpriseMeta will synthesize an EnterpriseMeta struct from the SpiffeIDAgent.
// in OSS this just returns an empty (but never nil) struct pointer
// in CE this just returns an empty (but never nil) struct pointer
func (id SpiffeIDMeshGateway) GetEnterpriseMeta() *acl.EnterpriseMeta {
return &acl.EnterpriseMeta{}
}

0
agent/connect/uri_mesh_gateway_oss_test.go → agent/connect/uri_mesh_gateway_ce_test.go

4
agent/connect/uri_service.go

@ -43,10 +43,10 @@ func (id SpiffeIDService) uriPath() string {
id.Service,
)
// Although OSS has no support for partitions, it still needs to be able to
// Although CE has no support for partitions, it still needs to be able to
// handle exportedPartition from peered Consul Enterprise clusters in order
// to generate the correct SpiffeID.
// We intentionally avoid using pbpartition.DefaultName here to be OSS friendly.
// We intentionally avoid using pbpartition.DefaultName here to be CE friendly.
if ap := id.PartitionOrDefault(); ap != "" && ap != "default" {
return "/ap/" + ap + path
}

6
agent/connect/uri_service_oss.go → agent/connect/uri_service_ce.go

@ -13,13 +13,13 @@ import (
)
// GetEnterpriseMeta will synthesize an EnterpriseMeta struct from the SpiffeIDService.
// in OSS this just returns an empty (but never nil) struct pointer
// in CE this just returns an empty (but never nil) struct pointer
func (id SpiffeIDService) GetEnterpriseMeta() *acl.EnterpriseMeta {
return &acl.EnterpriseMeta{}
}
// PartitionOrDefault breaks from OSS's pattern of returning empty strings.
// Although OSS has no support for partitions, it still needs to be able to
// PartitionOrDefault breaks from CE's pattern of returning empty strings.
// Although CE has no support for partitions, it still needs to be able to
// handle exportedPartition from peered Consul Enterprise clusters in order
// to generate the correct SpiffeID.
func (id SpiffeIDService) PartitionOrDefault() string {

0
agent/connect/uri_service_oss_test.go → agent/connect/uri_service_ce_test.go

0
agent/consul/acl_authmethod_oss.go → agent/consul/acl_authmethod_ce.go

4
agent/consul/acl_oss.go → agent/consul/acl_ce.go

@ -36,13 +36,13 @@ func (r *ACLResolver) resolveEnterpriseDefaultsForIdentity(identity structs.ACLI
// resolveEnterpriseIdentityAndRoles will resolve an enterprise identity to an additional set of roles
func (_ *ACLResolver) resolveEnterpriseIdentityAndRoles(_ structs.ACLIdentity) (structs.ACLIdentity, structs.ACLRoles, error) {
// this function does nothing in OSS
// this function does nothing in CE
return nil, nil, nil
}
// resolveEnterpriseIdentityAndPolicies will resolve an enterprise identity to an additional set of policies
func (_ *ACLResolver) resolveEnterpriseIdentityAndPolicies(_ structs.ACLIdentity) (structs.ACLIdentity, structs.ACLPolicies, error) {
// this function does nothing in OSS
// this function does nothing in CE
return nil, nil, nil
}

0
agent/consul/acl_oss_test.go → agent/consul/acl_ce_test.go

0
agent/consul/acl_endpoint_oss.go → agent/consul/acl_endpoint_ce.go

0
agent/consul/acl_server_oss.go → agent/consul/acl_server_ce.go

0
agent/consul/auth/binder_oss.go → agent/consul/auth/binder_ce.go

0
agent/consul/auth/token_writer_oss.go → agent/consul/auth/token_writer_ce.go

0
agent/consul/authmethod/authmethods_oss.go → agent/consul/authmethod/authmethods_ce.go

0
agent/consul/authmethod/kubeauth/k8s_oss.go → agent/consul/authmethod/kubeauth/k8s_ce.go

0
agent/consul/authmethod/ssoauth/sso_oss.go → agent/consul/authmethod/ssoauth/sso_ce.go

0
agent/consul/authmethod/testauth/testing_oss.go → agent/consul/authmethod/testauth/testing_ce.go

0
agent/consul/autopilot_oss.go → agent/consul/autopilot_ce.go

2
agent/consul/catalog_endpoint.go

@ -450,7 +450,7 @@ func vetDeregisterWithACL(
}
// This order must match the code in applyDeregister() in
// fsm/commands_oss.go since it also evaluates things in this order,
// fsm/commands_ce.go since it also evaluates things in this order,
// and will ignore fields based on this precedence. This lets us also
// ignore them from an ACL perspective.
if subj.ServiceID != "" {

0
agent/consul/config_oss.go → agent/consul/config_ce.go

0
agent/consul/discoverychain/compile_oss.go → agent/consul/discoverychain/compile_ce.go

0
agent/consul/enterprise_client_oss.go → agent/consul/enterprise_client_ce.go

0
agent/consul/enterprise_config_oss.go → agent/consul/enterprise_config_ce.go

4
agent/consul/enterprise_server_oss.go → agent/consul/enterprise_server_ce.go

@ -77,7 +77,7 @@ func (s *Server) validateEnterpriseIntentionPartition(partition string) error {
return nil
}
// No special handling for wildcard partitions as they are pointless in OSS.
// No special handling for wildcard partitions as they are pointless in CE.
return errors.New("Partitions is a Consul Enterprise feature")
}
@ -89,7 +89,7 @@ func (s *Server) validateEnterpriseIntentionNamespace(ns string, _ bool) error {
return nil
}
// No special handling for wildcard namespaces as they are pointless in OSS.
// No special handling for wildcard namespaces as they are pointless in CE.
return errors.New("Namespaces is a Consul Enterprise feature")
}

0
agent/consul/enterprise_server_oss_test.go → agent/consul/enterprise_server_ce_test.go

0
agent/consul/fsm/commands_oss.go → agent/consul/fsm/commands_ce.go

0
agent/consul/fsm/commands_oss_test.go → agent/consul/fsm/commands_ce_test.go

2
agent/consul/fsm/fsm.go

@ -264,7 +264,7 @@ func (c *FSM) Restore(old io.ReadCloser) error {
}
default:
if msg >= 64 {
return fmt.Errorf("msg type <%d> is a Consul Enterprise log entry. Consul OSS cannot restore it", msg)
return fmt.Errorf("msg type <%d> is a Consul Enterprise log entry. Consul CE cannot restore it", msg)
} else {
return fmt.Errorf("Unrecognized msg type %d", msg)
}

4
agent/consul/fsm/snapshot_oss.go → agent/consul/fsm/snapshot_ce.go

@ -18,7 +18,7 @@ import (
)
func init() {
registerPersister(persistOSS)
registerPersister(persistCE)
registerRestorer(structs.RegisterRequestType, restoreRegistration)
registerRestorer(structs.KVSRequestType, restoreKV)
@ -47,7 +47,7 @@ func init() {
registerRestorer(structs.PeeringSecretsWriteType, restorePeeringSecrets)
}
func persistOSS(s *snapshot, sink raft.SnapshotSink, encoder *codec.Encoder) error {
func persistCE(s *snapshot, sink raft.SnapshotSink, encoder *codec.Encoder) error {
if err := s.persistVirtualIPs(sink, encoder); err != nil {
return err
}

4
agent/consul/fsm/snapshot_oss_test.go → agent/consul/fsm/snapshot_ce_test.go

@ -34,7 +34,7 @@ func TestRestoreFromEnterprise(t *testing.T) {
StorageBackend: storageBackend,
})
// To verify if a proper message is displayed when Consul OSS tries to
// To verify if a proper message is displayed when Consul CE tries to
// unsuccessfully restore entries from a Consul Ent snapshot.
buf := bytes.NewBuffer(nil)
sink := &MockSink{buf, false}
@ -58,6 +58,6 @@ func TestRestoreFromEnterprise(t *testing.T) {
sink.Write([]byte{byte(structs.MessageType(entMockEntry.ID))})
encoder.Encode(entMockEntry)
require.EqualError(t, fsm.Restore(sink), "msg type <65> is a Consul Enterprise log entry. Consul OSS cannot restore it")
require.EqualError(t, fsm.Restore(sink), "msg type <65> is a Consul Enterprise log entry. Consul CE cannot restore it")
sink.Cancel()
}

4
agent/consul/fsm/snapshot_test.go

@ -27,7 +27,7 @@ import (
"github.com/hashicorp/consul/sdk/testutil"
)
func TestFSM_SnapshotRestore_OSS(t *testing.T) {
func TestFSM_SnapshotRestore_CE(t *testing.T) {
t.Parallel()
logger := testutil.Logger(t)
@ -941,7 +941,7 @@ func TestFSM_SnapshotRestore_OSS(t *testing.T) {
}
}
func TestFSM_BadRestore_OSS(t *testing.T) {
func TestFSM_BadRestore_CE(t *testing.T) {
t.Parallel()
// Create an FSM with some state.
logger := testutil.Logger(t)

0
agent/consul/leader_oss_test.go → agent/consul/leader_ce_test.go

4
agent/consul/leader_intentions_oss.go → agent/consul/leader_intentions_ce.go

@ -13,7 +13,7 @@ import (
)
func migrateIntentionsToConfigEntries(ixns structs.Intentions) []*structs.ServiceIntentionsConfigEntry {
// Remove any intention in OSS that happened to have used a non-default
// Remove any intention in CE that happened to have used a non-default
// namespace.
//
// The one exception is that if we find wildcards namespaces we "upgrade"
@ -56,7 +56,7 @@ func migrateIntentionsToConfigEntries(ixns structs.Intentions) []*structs.Servic
}
retained[name] = struct{}{}
output = append(output, ixn)
continue // a-ok for OSS
continue // a-ok for CE
}
// If anything is wildcarded, attempt to reify it as "default".

0
agent/consul/leader_intentions_oss_test.go → agent/consul/leader_intentions_ce_test.go

0
agent/consul/merge_oss.go → agent/consul/merge_ce.go

2
agent/consul/merge_oss_test.go → agent/consul/merge_ce_test.go

@ -16,7 +16,7 @@ import (
"github.com/hashicorp/consul/types"
)
func TestMerge_OSS_LAN(t *testing.T) {
func TestMerge_CE_LAN(t *testing.T) {
type testcase struct {
segment string
server bool

0
agent/consul/options_oss.go → agent/consul/options_ce.go

0
agent/consul/peering_backend_oss.go → agent/consul/peering_backend_ce.go

0
agent/consul/peering_backend_oss_test.go → agent/consul/peering_backend_ce_test.go

0
agent/consul/prepared_query/walk_oss_test.go → agent/consul/prepared_query/walk_ce_test.go

0
agent/consul/prepared_query_endpoint_oss.go → agent/consul/prepared_query_endpoint_ce.go

2
agent/consul/prepared_query_endpoint_oss_test.go → agent/consul/prepared_query_endpoint_ce_test.go

@ -17,7 +17,7 @@ import (
"github.com/stretchr/testify/require"
)
func TestPreparedQuery_OSS_Apply(t *testing.T) {
func TestPreparedQuery_CE_Apply(t *testing.T) {
if testing.Short() {
t.Skip("too slow for testing.Short")
}

0
agent/consul/rate/handler_oss.go → agent/consul/rate/handler_ce.go

0
agent/consul/reporting/reporting_oss.go → agent/consul/reporting/reporting_ce.go

8
agent/consul/segment_oss.go → agent/consul/segment_ce.go

@ -14,7 +14,7 @@ import (
"github.com/hashicorp/consul/agent/structs"
)
var SegmentOSSSummaries = []prometheus.SummaryDefinition{
var SegmentCESummaries = []prometheus.SummaryDefinition{
{
Name: []string{"leader", "reconcile"},
Help: "Measures the time spent updating the raft store from the serf member information.",
@ -26,7 +26,7 @@ func (s *Server) LANSegmentAddr(name string) string {
return ""
}
// setupSegmentRPC returns an error if any segments are defined since the OSS
// setupSegmentRPC returns an error if any segments are defined since the CE
// version of Consul doesn't support them.
func (s *Server) setupSegmentRPC() (map[string]net.Listener, error) {
if len(s.config.Segments) > 0 {
@ -36,7 +36,7 @@ func (s *Server) setupSegmentRPC() (map[string]net.Listener, error) {
return nil, nil
}
// setupSegments returns an error if any segments are defined since the OSS
// setupSegments returns an error if any segments are defined since the CE
// version of Consul doesn't support them.
func (s *Server) setupSegments(config *Config, rpcListeners map[string]net.Listener) error {
if len(config.Segments) > 0 {
@ -46,6 +46,6 @@ func (s *Server) setupSegments(config *Config, rpcListeners map[string]net.Liste
return nil
}
// floodSegments is a NOP in the OSS version of Consul.
// floodSegments is a NOP in the CE version of Consul.
func (s *Server) floodSegments(config *Config) {
}

2
agent/consul/server_oss.go → agent/consul/server_ce.go

@ -87,7 +87,7 @@ func (s *Server) removeFailedNode(
}
// lanPoolAllMembers only returns our own segment or partition's members, because
// OSS servers can't be in multiple segments or partitions.
// CE servers can't be in multiple segments or partitions.
func (s *Server) lanPoolAllMembers() ([]serf.Member, error) {
return s.LANMembersInAgentPartition(), nil
}

0
agent/consul/server_oss_test.go → agent/consul/server_ce_test.go

0
agent/consul/state/acl_oss.go → agent/consul/state/acl_ce.go

0
agent/consul/state/acl_oss_test.go → agent/consul/state/acl_ce_test.go

2
agent/consul/state/catalog_oss.go → agent/consul/state/catalog_ce.go

@ -115,7 +115,7 @@ func catalogUpdateNodeExtinctionIndex(tx WriteTxn, idx uint64, _ *acl.Enterprise
}
func catalogInsertNode(tx WriteTxn, node *structs.Node) error {
// ensure that the Partition is always clear within the state store in OSS
// ensure that the Partition is always clear within the state store in CE
node.Partition = ""
// Insert the node and update the index.

0
agent/consul/state/catalog_oss_test.go → agent/consul/state/catalog_ce_test.go

0
agent/consul/state/catalog_events_oss.go → agent/consul/state/catalog_events_ce.go

2
agent/consul/state/catalog_events_oss_test.go → agent/consul/state/catalog_events_ce_test.go

@ -14,7 +14,7 @@ import (
"github.com/hashicorp/consul/agent/structs"
)
func TestEventPayloadCheckServiceNode_Subject_OSS(t *testing.T) {
func TestEventPayloadCheckServiceNode_Subject_CE(t *testing.T) {
for desc, tc := range map[string]struct {
evt EventPayloadCheckServiceNode
sub string

2
agent/consul/state/config_entry_oss.go → agent/consul/state/config_entry_ce.go

@ -65,7 +65,7 @@ func configIntentionsConvertToList(iter memdb.ResultIterator, _ *acl.EnterpriseM
}
// getExportedServicesMatchServicesNames returns a list of service names that are considered matches when
// found in a list of exported-services config entries. For OSS, namespace is not considered, so a match is one of:
// found in a list of exported-services config entries. For CE, namespace is not considered, so a match is one of:
// - the service name matches
// - the service name is a wildcard
//

0
agent/consul/state/config_entry_oss_test.go → agent/consul/state/config_entry_ce_test.go

0
agent/consul/state/config_entry_exported_services_oss.go → agent/consul/state/config_entry_exported_services_ce.go

6
agent/consul/state/config_entry_intention.go

@ -83,7 +83,7 @@ type SamenessGroupMemberIndex struct {
}
// Compile-time assert that these interfaces hold to ensure that the
// methods correctly exist across the oss/ent split.
// methods correctly exist across the ce/ent split.
var _ memdb.Indexer = (*SamenessGroupMemberIndex)(nil)
var _ memdb.MultiIndexer = (*SamenessGroupMemberIndex)(nil)
@ -135,7 +135,7 @@ type ServiceIntentionSourceSamenessGroupIndex struct {
}
// Compile-time assert that these interfaces hold to ensure that the
// methods correctly exist across the oss/ent split.
// methods correctly exist across the ce/ent split.
var _ memdb.Indexer = (*ServiceIntentionSourceSamenessGroupIndex)(nil)
var _ memdb.MultiIndexer = (*ServiceIntentionSourceSamenessGroupIndex)(nil)
@ -199,7 +199,7 @@ type ServiceIntentionSourceIndex struct {
}
// Compile-time assert that these interfaces hold to ensure that the
// methods correctly exist across the oss/ent split.
// methods correctly exist across the ce/ent split.
var _ memdb.Indexer = (*ServiceIntentionSourceIndex)(nil)
var _ memdb.MultiIndexer = (*ServiceIntentionSourceIndex)(nil)

0
agent/consul/state/config_entry_intention_oss.go → agent/consul/state/config_entry_intention_ce.go

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save