localforwarder
This commit is contained in:
Родитель
95a5742c18
Коммит
e631f09fda
|
@ -14,7 +14,7 @@ app:
|
|||
name: "mutating-webhook"
|
||||
environment: "test"
|
||||
owner : "Microsoft"
|
||||
image: "mcr.microsoft.com/applicationinsights/codeless-attach/mutating-webhook:preview55"
|
||||
image: "mcr.microsoft.com/applicationinsights/codeless-attach/mutating-webhook:preview60"
|
||||
#agents: "gearamaaks.azurecr.io/public/applicationinsights/codeless-attach/mutating-webhook-agents:v31"
|
||||
agents: "mcr.microsoft.com/applicationinsights/codeless-attach/mutating-webhook-agents:preview2833"
|
||||
caBundle: "baseBundle"
|
||||
|
@ -27,7 +27,7 @@ replicaCount: 1
|
|||
nodeSelector: "{ \"beta.kubernetes.io/os\": linux }"
|
||||
|
||||
localForwarder:
|
||||
image: "gearamaaks.azurecr.io/public/applicationinsights/codeless-attach/local-forwarder:v10"
|
||||
image: "mcr.microsoft.com/applicationinsights/codeless-attach/local-forwarder:v14"
|
||||
name: "localforwarder"
|
||||
port: 50002
|
||||
adaptiveSamplingLimit: 5
|
||||
|
|
Двоичные данные
helm_package/helm-v0.8.4.tgz
Двоичные данные
helm_package/helm-v0.8.4.tgz
Двоичный файл не отображается.
|
@ -1,7 +1,7 @@
|
|||
setlocal
|
||||
call docker build -t local-forwarder . --no-cache
|
||||
call az acr login --name gearamaaks
|
||||
call docker tag local-forwarder gearamaaks.azurecr.io/public/applicationinsights/codeless-attach/local-forwarder:%1
|
||||
call docker push gearamaaks.azurecr.io/public/applicationinsights/codeless-attach/local-forwarder:%1
|
||||
call az acr login --name applicationinsights
|
||||
call docker tag local-forwarder applicationinsights.azurecr.io/public/applicationinsights/codeless-attach/local-forwarder:%1
|
||||
call docker push applicationinsights.azurecr.io/public/applicationinsights/codeless-attach/local-forwarder:%1
|
||||
endlocal
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ export class AddedTypes {
|
|||
},
|
||||
},
|
||||
{
|
||||
name: "OCAGENT_TRACE_EXPORTER_ENDPOINT",
|
||||
value: `localforwarder-${extraData.namespace}`,
|
||||
name: "OC_AGENT_ENDPOINT",
|
||||
value: `http://localforwarder-${extraData.namespace}.${extraData.namespace}:50002`,
|
||||
},
|
||||
/*{
|
||||
name: "APPLICATIONINSIGHTS_CONNECTION_STRING",
|
||||
|
|
|
@ -160,31 +160,30 @@ export class ContentProcessor {
|
|||
logger.info("attempting to get owner info");
|
||||
const extraData: DeployReplica = new DeployReplica();
|
||||
extraData.podName = this.content.request.object.metadata.generateName;
|
||||
const namespaceName = this.content.request.namespace;
|
||||
|
||||
const kc = new k8s.KubeConfig();
|
||||
kc.loadFromDefault();
|
||||
const k8sApi = kc.makeApiClient(k8s.AppsV1beta2Api);
|
||||
const namespaceName = this.content.request.namespace;
|
||||
const replicaName: string = "";
|
||||
/* tslint:disable */
|
||||
if (!this.content.request.object.metadata["ownerReferences"] ||
|
||||
!this.content.request.object.metadata["ownerReferences"].name) {
|
||||
extraData.deploymentName = extraData.podName;
|
||||
extraData.replicaName = extraData.podName;
|
||||
return Promise.resolve(extraData);
|
||||
}
|
||||
/* tslint:enable */
|
||||
|
||||
logger.info(`calling API with namespace ${namespaceName} and replicaset ${replicaName}`);
|
||||
|
||||
if (this.content.kind === "Testing") {
|
||||
extraData.deploymentName = extraData.podName;
|
||||
extraData.replicaName = extraData.podName;
|
||||
extraData.namespace = namespaceName;
|
||||
return Promise.resolve(extraData);
|
||||
}
|
||||
if (!this.content.request.object.metadata.ownerReferences
|
||||
|| !this.content.request.object.metadata.ownerReferences[0]
|
||||
|| !this.content.request.object.metadata.ownerReferences[0].name) {
|
||||
return Promise.reject("missing owner refference");
|
||||
}
|
||||
const replicaName = this.content.request.object.metadata.ownerReferences[0].name;
|
||||
logger.info(`calling API with namespace ${namespaceName} and replicaset ${replicaName}`);
|
||||
|
||||
return k8sApi.readNamespacedReplicaSet(replicaName, namespaceName).then((result) => {
|
||||
extraData.deploymentName = result.body.metadata.ownerReferences[0].name;
|
||||
extraData.replicaName = result.body.metadata.name;
|
||||
extraData.namespace = namespaceName;
|
||||
extraData.namespace = result.body.metadata.namespace;
|
||||
|
||||
logger.info(`got the following extra data ${JSON.stringify(extraData)}`);
|
||||
return extraData;
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -13,7 +13,7 @@
|
|||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>b7e468ca-66b3-4c24-a7a0-babb6bc44a7a</ProjectGuid>
|
||||
<ProjectHome>.</ProjectHome>
|
||||
<StartupFile>ContentProcessorTests.ts</StartupFile>
|
||||
<StartupFile>server.ts</StartupFile>
|
||||
<StartWebBrowser>True</StartWebBrowser>
|
||||
<SearchPath>
|
||||
</SearchPath>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
labels: ILabels;
|
||||
annotations: object;
|
||||
generateName?: string;
|
||||
ownerReferences?: object;
|
||||
}
|
||||
|
||||
export interface IMatchLabels {
|
||||
|
|
Загрузка…
Ссылка в новой задаче